Property | Type | Description | |
---|---|---|---|
$translations | translations array: [' |
Method | Description | |
---|---|---|
__construct ( array $availableLocales ) | Constructor. | |
addTranslation ( string $shortName, string $locale, string $translation ) | Adds translation for holiday in specific locale. | |
getTranslation ( string $shortName, string $locale ) : string | null | Returns translation for holiday in specific locale. | |
getTranslations ( string $shortName ) : array | Returns all available translations for holiday. | |
loadTranslations ( string $directoryPath ) | Loads translations from directory. |
Method | Description | |
---|---|---|
isValidLocale ( string $locale ) : true | Checks whether the given locale is a valid/available locale. |
public __construct ( array $availableLocales ) | ||
$availableLocales | array | list of all defined locales |
public getTranslations ( string $shortName ) : array | ||
$shortName | string | holiday short name |
return | array | holiday name translations [' |
protected isValidLocale ( string $locale ) : true | ||
$locale | string | locale the locale to be validated |
return | true | upon success, otherwise an UnknownLocaleException is thrown |
public loadTranslations ( string $directoryPath ) | ||
$directoryPath | string | directory path for translation files |