프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$translations | translations array: [' |
메소드 | 설명 | |
---|---|---|
__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. |
메소드 | 설명 | |
---|---|---|
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 |
리턴 | array | holiday name translations [' |
protected isValidLocale ( string $locale ) : true | ||
$locale | string | locale the locale to be validated |
리턴 | true | upon success, otherwise an UnknownLocaleException is thrown |
public loadTranslations ( string $directoryPath ) | ||
$directoryPath | string | directory path for translation files |