Include ISO_3166-1 alpha2 in sys_languages
There is already a field for this 2 char ISO code: static_lang_isocode
ATM the field is hidden if static_info_tables isn't loaded.
The TCA for reading from static_languages is not needed, static_info_tables overwrite the TCA of sys_language.
Instead use this field for the ISO code provided by a simple select, so you don't need static_info_tables. This dependency isn't needed, as the ISO code is the only field needed for core - i'ts used in flexforms:
sDEF - default
s[ISO-code] - language
(issue imported from #M13539)
#2 Updated by Steffen Kamper over 9 years ago
At the moment when static_info_tables is installed, the uid of the static_language record is saved in the field. With the patch the 2-char ISO code directly is used.
So there is an incompatibility which could be solved with update-routine from static_info_tables.
#3 Updated by Xavier Perseguers over 9 years ago
Patch, of t3lib_flexformtools.php, around line 306. Are you sure $row[$row['static... is correct? I guess it should be only $row['static_lang_isocode'], just as for t3lib_tceforms.php Furthermore, this can't compile as a semicolon is missing.
t3lib_transl8tools, third chunk, missing space after elseif. elseif($isLoaded && $row['static_lang_isocode']
t3lib/stddb/tables.sql, you define static_lang_isocode as varchar(3) but I read that you use a 2-char ISO code, as such I would like to read char(2) instead.
#6 Updated by Andreas Otto † over 9 years ago
Would it be possible to use a locale for the language?
If you have a website for branches in USA, Germany, Australia using the alpha2 code might still lead to problems with TV because "en" is used twice.
IMO using locales like en_US and en_AU would be better.
What do you think?
#8 Updated by Steffen Kamper over 9 years ago
That would be the next step. Take german speaking languages, you may use
so in general langKey_ISOcode
btw - this examples couldn't be used with static_info_tables, AT and CH are missing there!
Maybe we should move the langKey from BE_USER to sys_language as well.
@Tolleiv - thanks, flux destroys concentration.
#9 Updated by Patrick Gaumond over 9 years ago
Andreas and Steffen, there's already some stuff in the work for "Dialect support" in TYPO3.
Here we need FR_CA because you know, "courriel" isn't "email" in french... Except in France. ;)
The sad thing is that there's no ISO for Countries AND dialect. It's a mix like the one made by Mozilla or OOo:
Contact me if you need more information. email@example.com.
#10 Updated by Sigfried Arnold over 9 years ago
i don't get it - why should we use ISO 3166 in sys_languages? languages (2 letter codes) are definied in ISO 639-1
else the patch (13539.diff) is a bit unlucky since iso 639 is lowerchase. If done, there should also be a field for ISO 639-2.