Class Language
Provides a set of static methods to aid in the use of multi-language support. Supports the use of multiple simultaneous languages, including a default (fallback) language. When the definition can not be found in the set of primary keys, the default is used instead.
This class makes use of the following Configure class options:
Language.default - Defines the default (fallback) language (ISO 639-1/2) e.g. "en_us" Language.allow_pass_through - true/false allows keys without a definition to be passed through
Direct known subclasses
Methods summary
final public static
|
|
final public static
|
#
getText( string $lang_key, boolean $return = false )
Fetches text from the loaded language file. Will search the preferred language file first, if not found in there, then will search the default language file for the $lang_key text. |
final public static
|
#
loadLang( mixed $lang_file, string $language = null, string $lang_dir = LANGDIR )
Loads a language file whose properties may then be invoked. |
final public static
string
|
#
setLang( string $language )
Sets the language to load when not explicitly defined in the requested method |