Open main menu

Handbuch:$wgLang

This page is a translated version of the page Manual:$wgLang and the translation is 25% complete.

Other languages:
Deutsch • ‎English • ‎español • ‎polski • ‎português do Brasil • ‎čeština • ‎中文 • ‎日本語

Details

The user language object is the language object selected in user preferences. It is one of two global language objects, the other being $wgContLang . See the page Handbuch:Sprache for more information.

$wgLang is initialized towards the end of setup; some hooks are called earlier than that and should avoid using it. Wenn Zweifel bestehen, nutzen Sie $wgUser->isSafeToLoad() zum Überprüfen.

Often used Methods

This is not an exhaustive list, view class above to see a complete listing.

$wgLang->commaList( $list )
delimit a list of strings according to the conventions of the user's language
$wgLang->getCode()
return the user's language code, for example "en"