getPoFileWithMissingPlural example

// Import some .po files with formulas to set up the environment.     // These will also add the languages to the system.     $this->importPoFile($this->getPoFileWithSimplePlural()[
      'langcode' => 'fr',
    ]);
    $this->importPoFile($this->getPoFileWithComplexPlural()[
      'langcode' => 'hr',
    ]);

    // Attempt to import some broken .po files as well to prove that these     // will not overwrite the proper plural formula imported above.     $this->importPoFile($this->getPoFileWithMissingPlural()[
      'langcode' => 'fr',
      'overwrite_options[not_customized]' => TRUE,
    ]);
    $this->importPoFile($this->getPoFileWithBrokenPlural()[
      'langcode' => 'hr',
      'overwrite_options[not_customized]' => TRUE,
    ]);

    // Reset static caches from locale_get_plural() to ensure we get fresh data.     drupal_static_reset('locale_get_plural');
    drupal_static_reset('locale_get_plural:plurals');
    
Home | Imprint | This part of the site doesn't use cookies.