Class Language
Loads and sets the language *.ini files.
public static
|
|
public
|
|
public
|
|
public
|
|
public
string|boolean
|
#
getTranslation( string $key )
Searches and retrieves the translation associated to the $key. Returns $key if it doesn't exist (useful for the default language) |
protected
string
|
protected
string
|
$acceptLang
The "accept_lang" property of the client's browser |
|
protected
boolean
|
$isBot
(and equals !$acceptLang) whether the user is a bot or not. |
|
protected
array
|
$translations
The translations loaded for a given language |
#
array()
|
protected
array
|
$languages
The configuration setting for languages |
#
[
'default' => 'en',
'languages' => ['es', 'en']
]
|
protected
|
$service
The service model |