Project

General

Profile

Actions

Bug #22119

closed

Include ISO_3166-1 alpha2 in sys_languages

Added by Steffen Kamper almost 15 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-02-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

13539.diff (12.1 KB) 13539.diff Administrator Admin, 2010-02-15 00:35

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #61542: Add two-digit ISO 639-1 keys to sys_languageClosedBenni Mack2014-09-11

Actions
Actions #1

Updated by Steffen Kamper almost 15 years ago

attached is a patch which adds the ISO code and use it in core

Actions #2

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.

Actions #3

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.

Actions #4

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.

Actions #5

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

Actions #6

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?

Actions #7

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?

Actions #8

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.

Actions #9

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. .

Actions #10

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.

see http://www.loc.gov/standards/iso639-2/php/code_list.php

Actions #11

Updated by Xavier Perseguers almost 13 years ago

  • Assignee deleted (Steffen Kamper)
  • Target version deleted (0)
Actions #12

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)?

Actions #13

Updated by Georg Ringer almost 10 years ago

  • Status changed from Needs Feedback to Resolved

resolved with #61542

Actions #14

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF