[TYPO3-english] Get language code
Markus Klein
klein.t3 at reelworx.at
Thu Jan 15 15:51:58 CET 2015
I'm attaching an example how a language config should look like.
# English
config {
locale_all = en_US.utf8
language = en
htmlTag_langKey = en
sys_language_uid = 0
}
# German
[globalVar = GP:L = 1]
config {
locale_all = de_AT.utf8
language = de
htmlTag_langKey = de
sys_language_uid = 1
}
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 Markus Klein
> Sent: Thursday, January 15, 2015 10:51 AM
> To: 'TYPO3 English'
> Subject: Re: [TYPO3-english] Get language code
>
> 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
>
> _______________________________________________
> 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