[TYPO3-core] RFC: Bug #16919: Catalan flag is replaced by Canadian flag

Steffen Kamper info at sk-typo3.de
Fri Jan 14 10:51:46 CET 2011


Hi,

Am 14.01.2011 10:33, schrieb Ernesto Baschny [cron IT]:
>
> Thanks for the pointer, Alexandre! Now I see why this is all wrong to
> start with:
>
> The "flags" in TYPO3 core are 2-letter ISO codes for the *countries*,
> not languages! In sys_language, they have to be manually linked to a
> language. The misuse as "language 2 char code" as a "language code"
> (like done in the new EM) is wrong.
>
> The same situation can be seen now in the EM for "Arabic", which has the
> "Argentinian" (ar) flag, "Chinese" having the Swiss flag (ch) and many
> more which I might not even recognize spontaneously.
>
> So I would say we keep the flag system using the 2 letter ISO code of
> the country and a speaking name for "regions" (like "catalonia"), and
> then make the EM use some kind of mapping from a "language" to a "flag".
> The mapping could be located in t3skin, which is the one that ships with
> these flags. I'll try to come up with a patch for it later on.
>

in em i use this call with the 2-letter country:
$cls =  t3lib_iconWorks::getSpriteIconClasses('flags-' . $language);

As this is more or less hacky manual request i would suggest something like
t3lib_iconWorks::getSpriteIconForLanguage($code)
t3lib_iconWorks::getSpriteIconForCountry($code)

which would make it more API-like, what do you think?

vg Steffen



More information about the TYPO3-team-core mailing list