contao/test — Issue #2151: Extented language flag
Author: importer
Created: 2011-11-29 09:11:57+00:00
State: open
Labels: Accepted, Feature, framework

**Problem:** Actually it is not possible to provide regional and stylish different language packs for Contao.
**Different Regions:** In some languages (e.g: de, es) there are important regional differences which should be possible to realize in different language packs.
**Different Styles:** Another important difference could exist in relation to the environment in which Contao will be used. There is a difference if you use it in a sport club, a young environment or if you do in a commercial or government relation. This is not a mayor problem in English language but e.g. in German or Spanish language. In German there is the difference of "Du" and "Sie" which is nearly the same in Spanish between "Tu" and "Usted". The result are really different language packets.
If we look forward to an universal use of Contao we should be aware of the problem and look out for an implantation which is compatible with the present situation but opens the door for future amplification.
**Possible Solution:** I found some publications (e.g. http://www.w3.org/International/articles/language-tags/) which gave me the idea to extend the language flag we use in Contao in a normalized way with sub tags for region and private use.
Here some examples:
* es-AR-x-formal (Language: Spanish, Region: Argentine, private flag: formal [with prefix x] represents "Usted")
* de-AU-x-informal (Language: Deutsch, Region: Austria, private flag: informal represents "Du")

It's optional to add the region sub flag or -x(private) sub flag but if one of them is present they should be rendered in core, extensions and translation tools.
If you implement this extended language flag first in the translation tools of core and extensions there would be a seamless way of creation of variants of language packs which would be used as if progress in core and extensions will be aware of, or ignored were extended language flag isn't present or handling still not implemented.
I'm sorry not to be able to give an example of implementation because of my ignorance in PHP but hope that my idea gives some useful input.
Klaus

--- _Originally created by klabog on June 16th, 2010, at 09:19pm (ID 2151)_