\core\commonLanguage

This class maintains state of the selected language and can set the language.

Summary

Methods
Properties
Constants
__construct()
setTextDomain()
getLang()
getLocalisedValue()
$locale
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$locale

$locale : 

language display name for the language set by the constructor

Type

Methods

__construct()

__construct() : 

Constructor sets the language by calling set_lang and stores language settings in object properties additionally it also sets static variables $laing_index and $root

Returns

setTextDomain()

setTextDomain(  domain) : 

Sets the gettext domain

Parameters

domain

Returns

previous seting so that you can restore it later

getLang()

getLang() : 

gets the language setting in CAT

Returns

getLocalisedValue()

getLocalisedValue(mixed|string|int  valueArray) : 

pick a proper value for a given language

Parameters

mixed|string|int valueArray

an array of (locale,content) records

Returns

localised value corresponding to the chosen locale or to the defalut locale C if a better mach was not available