Public Member Functions | |
| startup (&$controller) | |
| getString ($id, $messageArgs=null) | |
| setCode ($code) | |
| getCode () | |
| doesLanguageExist ($lang) | |
| getAcceptedLanguages () | |
| findLanguage () | |
| getBrowserLang () | |
| getVhostLang ($useTld=false) | |
| & | getMessageArray () |
| getMessages () | |
| getTldFromLanguage ($langcode) | |
Data Fields | |
| $controller = false | |
| $components = array () | |
Definition at line 41 of file locale.php.
| doesLanguageExist | ( | $ | lang | ) |
Definition at line 184 of file locale.php.
| findLanguage | ( | ) |
find the startup-language by looking at the LANGUAGE define in core/config.php
Definition at line 197 of file locale.php.
Referenced by startup().

| getAcceptedLanguages | ( | ) |
Definition at line 189 of file locale.php.
| getBrowserLang | ( | ) |
try to find an language that we have as a file and that has a high priority in the users browser. returns EN if anything fails
Definition at line 227 of file locale.php.
| getCode | ( | ) |
Definition at line 150 of file locale.php.
| & getMessageArray | ( | ) |
return the array containing all locale-codes by reference
Definition at line 308 of file locale.php.
| getMessages | ( | ) |
load the message-array by loading controllers/lang/XX.php tries to cache the array via APC (if loaded)
Definition at line 319 of file locale.php.
Referenced by getString().

| getString | ( | $ | id, | |
| $ | messageArgs = null | |||
| ) |
return the translation for the given string-identifier
| string | $id identifier to look up translation | |
| array | $messageArgs optional parameters that will be formatted into the string with printf |
Definition at line 87 of file locale.php.
References getMessages().

| getTldFromLanguage | ( | $ | langcode | ) |
map given DINISO to language-tld-code code for setLocale()
| string | DINISO-code |
Definition at line 419 of file locale.php.
| getVhostLang | ( | $ | useTld = false |
) |
try to find an language that we have as a file depending on the current domain name foo.example.tr -> "tr" [foo.bar.]tr.example.com -> "tr"
Definition at line 281 of file locale.php.
| setCode | ( | $ | code | ) |
sets a language-code. writes the code into the session of the user and sets Lang_Code for all views
| string | $code short iso-code for language ("de" "en" "fr") |
Definition at line 130 of file locale.php.
Referenced by startup().

| startup | ( | &$ | controller | ) |
called by controller after the component was instanciated first
| object | $controller the calling controller |
Definition at line 77 of file locale.php.
References $controller, findLanguage(), and setCode().

| $components = array () |
Definition at line 52 of file locale.php.
| $controller = false |
1.5.8