|
const | DEFAULT_LANG = 'en_US' |
|
i18n handling
- Author
- Johan Cwiklinski johan.nosp@m.@x-t.nosp@m.nd.be
◆ __construct()
Galette\Core\I18n::__construct |
( |
string|false |
$lang = false | ) |
|
Default constructor. Initialize default language and set environment variables
- Parameters
-
string | false | $lang | true if there were a language change |
- Returns
- void
◆ changeLanguage()
Galette\Core\I18n::changeLanguage |
( |
string |
$id | ) |
|
Load language parameters
- Parameters
-
string | $id | Identifier for requested language |
- Returns
- void
◆ getAbbrev()
Galette\Core\I18n::getAbbrev |
( |
| ) |
|
Get current abbreviation
- Returns
- string current language abbreviation
◆ getArrayList()
Galette\Core\I18n::getArrayList |
( |
| ) |
|
List languages as simple array
- Returns
- array<string,string>
◆ getID()
Galette\Core\I18n::getID |
( |
| ) |
|
Get current id
- Returns
- string current language identifier
◆ getList()
Galette\Core\I18n::getList |
( |
| ) |
|
List languages
- Returns
- array<int, I18n> list of all active languages
◆ getLongID()
Galette\Core\I18n::getLongID |
( |
| ) |
|
Get long identifier
- Returns
- string current language long identifier
◆ getName()
Galette\Core\I18n::getName |
( |
| ) |
|
Get current name
- Returns
- string current language name
◆ getNameFromId()
Galette\Core\I18n::getNameFromId |
( |
string |
$id | ) |
|
Gets language full name from its ID
- Parameters
-
string | $id | the language identifier |
- Returns
- string name for specified identifier
◆ guessLangs()
Galette\Core\I18n::guessLangs |
( |
| ) |
|
Guess available languages from directories that are present in the lang directory.
Will store found langs in class langs variable and return it.
- Returns
- array<string,array<string,string>>
◆ isRTL()
Galette\Core\I18n::isRTL |
( |
| ) |
|
Is current language RTL?
- Returns
- boolean
◆ seemUtf8()
static Galette\Core\I18n::seemUtf8 |
( |
string |
$str | ) |
|
|
static |
Is a string seem to be UTF-8 one ?
- Parameters
-
string | $str | string to analyze |
- Returns
- boolean
◆ updateEnv()
Galette\Core\I18n::updateEnv |
( |
| ) |
|
Update environment according to locale. Mainly used at app initialization or at login
- Returns
- void
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/galette-apidoc/checkouts/develop/galette/lib/Galette/Core/I18n.php