Bug #22119
closedInclude ISO_3166-1 alpha2 in sys_languages
0%
Description
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)
Files
Updated by Steffen Kamper almost 15 years ago
attached is a patch which adds the ISO code and use it in core
Updated by Steffen Kamper almost 15 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.
Updated by Xavier Perseguers almost 15 years ago
Hi,
By reading:
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.
Updated by Steffen Kamper almost 15 years ago
I corrected the 2 chunks, thx.
I used varchar(3) as static_info_tables use integers which might need 3 chars for saving.
Updated by Tolleiv Nietsch almost 15 years ago
hm transl8tools checks two times for "$isLoaded && $row['static_lang_isocode']" ... imho elseif block will never be reached
Updated by Andreas Otto † almost 15 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?
Updated by Andreas Otto † almost 15 years ago
Wrong example given by me.
Switzerland or Belgium will suit as a better example. You could have a TYPO3 installation for one of these countries and use more than one language.
How to solve that with alpha2 codes?
Updated by Steffen Kamper almost 15 years ago
That would be the next step. Take german speaking languages, you may use
de_DE
de_AT
de_CH
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 Nietsch - thanks, flux destroys concentration.
Updated by Patrick Gaumond almost 15 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:
http://l10n.openoffice.org/L10N_Framework/iso_code_build2.html
https://wiki.mozilla.org/L10n:Simple_locale_names
Contact me if you need more information. firstname.name@infoglobe.ca.
Updated by Sigfried Arnold over 14 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.
Updated by Xavier Perseguers almost 13 years ago
- Assignee deleted (
Steffen Kamper) - Target version deleted (
0)
Updated by Alexander Opitz almost 10 years ago
- Status changed from Accepted to Needs Feedback
- Is Regression set to No
Hi,
as this issue is very old. Does the problem still exists within newer versions of TYPO3 CMS (6.2.8)?
Updated by Georg Ringer almost 10 years ago
- Status changed from Needs Feedback to Resolved
resolved with #61542