addTranslation() public method

Adds translation for holiday in specific locale.
public addTranslation ( string $shortName, string $locale, string $translation )
$shortName string holiday short name
$locale string locale
$translation string translation
Beispiel #1
0
 /**
  * Tests that no translation is returned for not translated locale.
  */
 public function testNoTranslationForNotTranslatedLocale()
 {
     $translations = new Translations($this->locales);
     $locale = 'en_US';
     $shortName = 'newYearsDay';
     $translation = 'New Year\'s Day';
     $unknownLocale = 'pl_PL';
     $translations->addTranslation($shortName, $locale, $translation);
     $this->assertNull($translations->getTranslation($shortName, $unknownLocale));
 }