Bug #22119
closed
Include ISO_3166-1 alpha2 in sys_languages
Added by Steffen Kamper almost 15 years ago.
Updated about 6 years ago.
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
attached is a patch which adds the ISO code and use it in core
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.
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.
I corrected the 2 chunks, thx.
I used varchar(3) as static_info_tables use integers which might need 3 chars for saving.
hm transl8tools checks two times for "$isLoaded && $row['static_lang_isocode']" ... imho elseif block will never be reached
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?
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?
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.
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.
see http://www.loc.gov/standards/iso639-2/php/code_list.php
- Assignee deleted (
Steffen Kamper)
- Target version deleted (
0)
- 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)?
- Status changed from Needs Feedback to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF