getPoFileWithComplexPlural example



  /** * Tests locale_get_plural() and \Drupal::translation()->formatPlural(). */
  public function testGetPluralFormat() {
    // 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',
      
Home | Imprint | This part of the site doesn't use cookies.