[TYPO3-dev] BE Language flags (iconworks)

Stephen Bungert stephenbungert at yahoo.de
Sat Oct 22 18:49:54 CEST 2011


I need to display BE language flags in a BE module I am developing.

I'm going through a locallang file, getting the language keys and then 
getting iconworks to generate the langauge span tag that shows the language 
flag in the BE, like this:

t3lib_iconWorks::getSpriteIcon('flags-' . $langKey);

The problem is, is that the default language's language key in the LL file 
is "default" and this generates a red icon with a question mark.

I see that the span tag finds the correct part of the flag sprite based on 
the language code (like de for german).

I think for the default language I must know what it is and use the language 
code for the default language when I try and get iconworks to generate the 
flag span tag, but how do I find this out?

I thought maybe with getSystemLanguages()

but the flag element for the the default language just contains 
"empty-empty" instead of "flag-xx".

Does anyone know how to get the language code for the default language? 




More information about the TYPO3-dev mailing list