[TYPO3-english] Get language code

Markus Klein klein.t3 at reelworx.at
Thu Jan 15 10:50:35 CET 2015


Hi!

You can't "find" the default code, it has to be configured in TypoScript.

Kind regards
Markus

------------------------------------------------------------
Markus Klein
TYPO3 CMS Active Contributors Team Member

> -----Original Message-----
> From: typo3-english-bounces at lists.typo3.org [mailto:typo3-english-
> bounces at lists.typo3.org] On Behalf Of Bernhard Schenkenfelder
> Sent: Thursday, January 15, 2015 7:51 AM
> To: typo3-english at lists.typo3.org
> Subject: [TYPO3-english] Get language code
> 
> As far as I know, there are two ways to retrieve the current (front-end)
> language:
> 
> $GLOBALS['TSFE']->config['config']['language']
> $GLOBALS['TSFE']->sys_language_uid
> 
> If the latter is 2, then the config value is, say, 'dk'. However, if the language
> UID is 0, then the first variable returns '' (empty string).
> 
> Is there a mapping between sys_language_uid and the language code, or in
> other words, where/how can I find the default language (code)?
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english



More information about the TYPO3-english mailing list