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

Ernesto Baschny [cron IT] ernst at cron-it.de
Fri Jan 14 11:06:44 CET 2011


Steffen Kamper schrieb am 14.01.2011 10:51:
> 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?

It would, but then again I agree with Alexandre, that it might not be
worth it, since we don't have language flags yet. We only have country
flags. :) Most of them might have a "unique mapping", but some will have
some controversy surrounding them (like English, ...).

Cheers,
Ernesto



More information about the TYPO3-team-core mailing list