static class to get a localized string
| package |
jelix |
|---|---|
| subpackage |
core |
__construct()
..
get(string $key, array $args = null, string $locale = null, string $charset = null) : string
if it can't get the correct language, it will try to gets the string from the default language. if both fails, it will raise an exception.
| Throws |
|
|---|
stringthe key of the localized string
arrayarguments to apply to the localized string with sprintf
stringthe lang code. if null, use the default language
stringthe charset code. if null, use the default charset
stringthe localized string
getCorrespondingLocale( $l, boolean $strictCorrespondance = false) : string
booleanif true don't try to find a locale from an other country
stringthe corresponding locale
getCurrentCountry() : string
string
getCurrentLang() : string
string
getPreferedLocaleFromRequest() : string
stringthe locale. empty if not found.
langToLocale(string $lang) : string
The file lang_to_locale give corresponding locale, but you can override these association into the langToLocale section of the main configuration
stringa lang code (xx)
stringthe corresponding locale (xx_YY)
bundles : array<mixed,\jBundle[]>
| var |
|---|
array<mixed,\jBundle[]>
langToLocale : array
| var |
content of the lang_to_locale.ini.php |
|---|
array