[DB][FEATURE] Add ISO 639-1 keys to sys_language 84/32884/16
authorBenjamin Mack <benni@typo3.org>
Sat, 8 Nov 2014 19:07:07 +0000 (20:07 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Thu, 4 Dec 2014 06:11:38 +0000 (07:11 +0100)
The language handling of records in TYPO3
is solely based on UIDs of the sys_language DB table,
but no reference to the real language used.

The ISO 639-1 defines the language identifiers
(ISO language code) completely (182 entries).

If the real language key was needed before in
TYPO3, one could install static_info_tables
which takes a field ("static_lang_isocode") in the
various places of the TYPO3 Core and fetches
the isocode via separate SQL-Queries.

The change introduces the ISO language
two-letter-keys natively in the core in order to
1. use less SQL queries in FE and BE if
static_info_tables was installed
2. remove hard coded dependencies of
EXT:static_info_tables
3. and always ensure that the core
includes the ISO code

Additionally one can now use the
$TSFE->sys_language_isocode all the time for
working with the ISO code instead of the
UID parameter, meaning that isocode can now be
set with a TypoScript parameter as well.

A Migration Wizard moves values put in the old
DB field (which is a UID reference to
static_languages) to the new DB field "language_isocode".

The old field is deprecated to use without the
new properly filled field "language_isocode".

In TYPO3 CMS 8 the static_lang_isocode field
will be removed within the CMS core (but could
still be included in static_info_tables).

Releases: master
Resolves: #61542
Change-Id: Ia017af52af354ac204ffac11635d99df120b029a
Reviewed-on: http://review.typo3.org/32884
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
14 files changed:
typo3/sysext/backend/Classes/Configuration/TranslationConfigurationProvider.php
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Classes/Form/FormEngine.php
typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php
typo3/sysext/core/Configuration/TCA/sys_language.php
typo3/sysext/core/Documentation/Changelog/master/Feature-61542-AddIsoLanguageKeys.rst [new file with mode: 0644]
typo3/sysext/core/Resources/Private/Language/db.xlf [new file with mode: 0644]
typo3/sysext/core/ext_tables.sql
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Page/PageGenerator.php
typo3/sysext/install/Classes/Updates/LanguageIsoCodeUpdate.php [new file with mode: 0644]
typo3/sysext/install/ext_localconf.php
typo3/sysext/lang/locallang_tca.xlf

index 316b3fb..cc24b0c 100644 (file)
@@ -60,7 +60,10 @@ class TranslationConfigurationProvider {
                $sysLanguages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_language', '');
                foreach ($sysLanguages as $row) {
                        $languageIconTitles[$row['uid']] = $row;
-                       if ($row['static_lang_isocode'] && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('static_info_tables')) {
+                       if (!empty($row['language_isocode'])) {
+                               $languageIconTitles[$row['uid']]['ISOcode'] = $row['language_isocode'];
+                       } elseif ($row['static_lang_isocode'] && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('static_info_tables')) {
+                               \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('Usage of the field "static_lang_isocode" is discouraged, and will stop working with CMS 8. Use the built-in language field "language_isocode" in your sys_language records.');
                                $staticLangRow = BackendUtility::getRecord('static_languages', $row['static_lang_isocode'], 'lg_iso_2');
                                if ($staticLangRow['lg_iso_2']) {
                                        $languageIconTitles[$row['uid']]['ISOcode'] = $staticLangRow['lg_iso_2'];
index cd17f88..3df9828 100644 (file)
@@ -1302,7 +1302,7 @@ class EditDocumentController {
                );
                $exQ = $GLOBALS['BE_USER']->isAdmin() ? '' : ' AND sys_language.hidden=0';
                if ($id) {
-                       $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('sys_language.*', 'pages_language_overlay,sys_language', 'pages_language_overlay.sys_language_uid=sys_language.uid AND pages_language_overlay.pid=' . (int)$id . BackendUtility::deleteClause('pages_language_overlay') . $exQ, 'pages_language_overlay.sys_language_uid,sys_language.uid,sys_language.pid,sys_language.tstamp,sys_language.hidden,sys_language.title,sys_language.static_lang_isocode,sys_language.flag', 'sys_language.title');
+                       $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('sys_language.*', 'pages_language_overlay,sys_language', 'pages_language_overlay.sys_language_uid=sys_language.uid AND pages_language_overlay.pid=' . (int)$id . BackendUtility::deleteClause('pages_language_overlay') . $exQ, 'pages_language_overlay.sys_language_uid,sys_language.uid,sys_language.pid,sys_language.tstamp,sys_language.hidden,sys_language.title,sys_language.language_isocode,sys_language.static_lang_isocode,sys_language.flag', 'sys_language.title');
                } else {
                        $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('sys_language.*', 'sys_language', 'sys_language.hidden=0', '', 'sys_language.title');
                }
index 07f3e02..8eadcd1 100644 (file)
@@ -1260,7 +1260,7 @@ class PageLayoutController {
                                'pages_language_overlay,sys_language',
                                'pages_language_overlay.sys_language_uid=sys_language.uid AND pages_language_overlay.pid=' . (int)$id . $exQ .
                                        BackendUtility::versioningPlaceholderClause('pages_language_overlay'),
-                               'pages_language_overlay.sys_language_uid,sys_language.uid,sys_language.pid,sys_language.tstamp,sys_language.hidden,sys_language.title,sys_language.static_lang_isocode,sys_language.flag',
+                               'pages_language_overlay.sys_language_uid,sys_language.uid,sys_language.pid,sys_language.tstamp,sys_language.hidden,sys_language.title,sys_language.language_isocode,sys_language.static_lang_isocode,sys_language.flag',
                                'sys_language.title'
                        );
                } else {
index d8c7937..cfe5e29 100644 (file)
@@ -4272,7 +4272,7 @@ class FormEngine {
                $isL = ExtensionManagementUtility::isLoaded('static_info_tables');
                // Find all language records in the system:
                $db = $this->getDatabaseConnection();
-               $res = $db->exec_SELECTquery('static_lang_isocode,title,uid', 'sys_language', 'pid=0 AND hidden=0' . BackendUtility::deleteClause('sys_language'), '', 'title');
+               $res = $db->exec_SELECTquery('language_isocode,static_lang_isocode,title,uid', 'sys_language', 'pid=0 AND hidden=0' . BackendUtility::deleteClause('sys_language'), '', 'title');
                // Traverse them:
                $output = array();
                if ($setDefault) {
@@ -4284,7 +4284,10 @@ class FormEngine {
                }
                while ($row = $db->sql_fetch_assoc($res)) {
                        $output[$row['uid']] = $row;
-                       if ($isL && $row['static_lang_isocode']) {
+                       if (!empty($row['language_isocode'])) {
+                               $output[$row['uid']]['ISOcode'] = $row['language_isocode'];
+                       } elseif ($isL && $row['static_lang_isocode']) {
+                               \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('Usage of the field "static_lang_isocode" is discouraged, and will stop working with CMS 8. Use the built-in language field "language_isocode" in your sys_language records.');
                                $rr = BackendUtility::getRecord('static_languages', $row['static_lang_isocode'], 'lg_iso_2');
                                if ($rr['lg_iso_2']) {
                                        $output[$row['uid']]['ISOcode'] = $rr['lg_iso_2'];
@@ -4405,7 +4408,10 @@ class FormEngine {
                                foreach ($uids as $uid) {
                                        if ($sys_language_rec = BackendUtility::getRecord('sys_language', $uid)) {
                                                $this->cachedAdditionalPreviewLanguages[$uid] = array('uid' => $uid);
-                                               if ($sys_language_rec['static_lang_isocode'] && ExtensionManagementUtility::isLoaded('static_info_tables')) {
+                                               if (!empty($sys_language_rec['language_isocode'])) {
+                                                       $this->cachedAdditionalPreviewLanguages[$uid]['ISOcode'] = $sys_language_rec['language_isocode'];
+                                               } elseif ($sys_language_rec['static_lang_isocode'] && ExtensionManagementUtility::isLoaded('static_info_tables')) {
+                                                       \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('Usage of the field "static_lang_isocode" is discouraged, and will stop working with CMS 8. Use the built-in language field "language_isocode" in your sys_language records.');
                                                        $staticLangRow = BackendUtility::getRecord('static_languages', $sys_language_rec['static_lang_isocode'], 'lg_iso_2');
                                                        if ($staticLangRow['lg_iso_2']) {
                                                                $this->cachedAdditionalPreviewLanguages[$uid]['uid'] = $uid;
index 0084751..33885aa 100644 (file)
@@ -243,7 +243,7 @@ class FlexFormTools {
                $isL = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('static_info_tables');
                // Find all language records in the system
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
-                       'static_lang_isocode,title,uid',
+                       'language_isocode,static_lang_isocode,title,uid',
                        'sys_language',
                        'pid=0' . BackendUtility::deleteClause('sys_language'),
                        '',
@@ -258,7 +258,10 @@ class FlexFormTools {
                );
                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                        $output[$row['uid']] = $row;
-                       if ($isL && $row['static_lang_isocode']) {
+                       if (!empty($row['language_isocode'])) {
+                               $output[$row['uid']]['ISOcode'] = $row['language_isocode'];
+                       } elseif ($isL && $row['static_lang_isocode']) {
+                               \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('Usage of the field "static_lang_isocode" is discouraged, and will stop working with CMS 8. Use the built-in language field "language_isocode" in your sys_language records.');
                                $rr = BackendUtility::getRecord('static_languages', $row['static_lang_isocode'], 'lg_iso_2');
                                if ($rr['lg_iso_2']) {
                                        $output[$row['uid']]['ISOcode'] = $rr['lg_iso_2'];
index 1ddf222..9b61ade 100644 (file)
@@ -36,6 +36,203 @@ return array(
                                'default' => '0'
                        )
                ),
+               'language_isocode' => array(
+                       'exclude' => 1,
+                       'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_language.language_isocode',
+                       'config' => array(
+                               'type' => 'select',
+                               'size' => 1,
+                               'minitems' => 0,
+                               'maxitems' => 1,
+                               // list taken from http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
+                               'items' => array(
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ab', 'ab'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.aa', 'aa'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.af', 'af'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ak', 'ak'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.sq', 'sq'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.am', 'am'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ar', 'ar'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.an', 'an'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.hy', 'hy'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.as', 'as'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.av', 'av'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ae', 'ae'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ay', 'ay'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.az', 'az'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.bm', 'bm'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ba', 'ba'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.eu', 'eu'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.be', 'be'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.bn', 'bn'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.bh', 'bh'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.bi', 'bi'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.bs', 'bs'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.br', 'br'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.bg', 'bg'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.my', 'my'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ca', 'ca'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ch', 'ch'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ce', 'ce'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ny', 'ny'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.zh', 'zh'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.cv', 'cv'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.kw', 'kw'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.co', 'co'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.cr', 'cr'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.hr', 'hr'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.cs', 'cs'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.da', 'da'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.dv', 'dv'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.nl', 'nl'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.dz', 'dz'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.en', 'en'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.eo', 'eo'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.et', 'et'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ee', 'ee'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.fo', 'fo'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.fj', 'fj'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.fi', 'fi'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.fr', 'fr'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ff', 'ff'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.gl', 'gl'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ka', 'ka'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.de', 'de'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.el', 'el'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.gn', 'gn'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.gu', 'gu'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ht', 'ht'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ha', 'ha'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.he', 'he'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.hz', 'hz'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.hi', 'hi'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ho', 'ho'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.hu', 'hu'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ia', 'ia'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.id', 'id'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ie', 'ie'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ga', 'ga'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ig', 'ig'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ik', 'ik'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.io', 'io'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.is', 'is'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.it', 'it'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.iu', 'iu'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ja', 'ja'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.jv', 'jv'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.kl', 'kl'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.kn', 'kn'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.kr', 'kr'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ks', 'ks'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.kk', 'kk'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.km', 'km'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ki', 'ki'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.rw', 'rw'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ky', 'ky'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.kv', 'kv'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.kg', 'kg'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ko', 'ko'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ku', 'ku'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.kj', 'kj'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.la', 'la'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.lb', 'lb'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.lg', 'lg'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.li', 'li'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ln', 'ln'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.lo', 'lo'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.lt', 'lt'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.lu', 'lu'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.lv', 'lv'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.gv', 'gv'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.mk', 'mk'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.mg', 'mg'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ms', 'ms'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ml', 'ml'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.mt', 'mt'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.mi', 'mi'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.mr', 'mr'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.mh', 'mh'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.mn', 'mn'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.na', 'na'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.nv', 'nv'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.nd', 'nd'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ne', 'ne'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ng', 'ng'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.nb', 'nb'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.nn', 'nn'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.no', 'no'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ii', 'ii'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.nr', 'nr'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.oc', 'oc'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.oj', 'oj'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.cu', 'cu'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.om', 'om'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.or', 'or'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.os', 'os'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.pa', 'pa'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.pi', 'pi'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.fa', 'fa'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.pl', 'pl'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ps', 'ps'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.pt', 'pt'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.qu', 'qu'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.rm', 'rm'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.rn', 'rn'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ro', 'ro'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ru', 'ru'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.sa', 'sa'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.sc', 'sc'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.sd', 'sd'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.se', 'se'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.sm', 'sm'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.sg', 'sg'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.sr', 'sr'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.gd', 'gd'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.sn', 'sn'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.si', 'si'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.sk', 'sk'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.sl', 'sl'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.so', 'so'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.st', 'st'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.es', 'es'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.su', 'su'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.sw', 'sw'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ss', 'ss'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.sv', 'sv'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ta', 'ta'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.te', 'te'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.tg', 'tg'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.th', 'th'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ti', 'ti'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.bo', 'bo'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.tk', 'tk'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.tl', 'tl'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.tn', 'tn'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.to', 'to'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.tr', 'tr'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ts', 'ts'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.tt', 'tt'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.tw', 'tw'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ty', 'ty'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ug', 'ug'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.uk', 'uk'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ur', 'ur'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.uz', 'uz'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.ve', 've'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.vi', 'vi'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.vo', 'vo'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.wa', 'wa'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.cy', 'cy'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.wo', 'wo'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.fy', 'fy'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.xh', 'xh'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.yi', 'yi'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.yo', 'yo'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.za', 'za'),
+                                       array('LLL:EXT:core/Resources/Private/Language/db.xlf:sys_language.language_isocode.zu', 'zu')
+                               )
+                       )
+               ),
                'static_lang_isocode' => array(
                        'exclude' => 1,
                        'label' => 'LLL:EXT:lang/locallang_tca.xlf:sys_language.isocode',
@@ -67,6 +264,6 @@ return array(
                )
        ),
        'types' => array(
-               '1' => array('showitem' => 'hidden,title,static_lang_isocode,flag')
+               '1' => array('showitem' => 'hidden,title,language_isocode,flag')
        )
 );
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-61542-AddIsoLanguageKeys.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-61542-AddIsoLanguageKeys.rst
new file mode 100644 (file)
index 0000000..9c75bd6
--- /dev/null
@@ -0,0 +1,68 @@
+===============================================================
+Feature: #61542 - Add two-letter ISO 639-1 keys to sys_language
+===============================================================
+
+Description
+===========
+
+The handling of the languages is done by the sys_language database table, which is usually referenced via the common
+sys_language_uid. The commonly referenced ISO 639-1 two-letter-code is only in use when static_info_tables is installed,
+which brings all ISO 639-1 letter-codes in a separate table. The CMS Core uses a hard-coded dependency on the extension
+to retrieve the ISO codes where needed, however, already ships an empty and invisible field "static_lang_isocode" is
+already supplied by the CMS Core.
+
+As a first step to identify languages by their proper ISO 639-1 two-letter code a new DB field for sys_language called
+"language_isocode" is introduced, which is used in all places of the TYPO3 CMS Core.
+
+Additionally the new TypoScript option config.sys_language_isocode can be used to set the existing
+$TSFE->sys_language_isocode variable via TypoScript. Previously this was done via static_info_tables.
+
+The ISO code is also used for the language attribute of the HTML tag. Therefore the setting config.htmlTag_langKey
+is not needed anymore if it is the same as the ISO code.
+
+Impact
+======
+
+Frontend:
+The value $TSFE->sys_language_isocode is now filled at any time. It can be set via TypoScript, or is automatically
+set if the config.sys_language_uid parameter is set > 0 from the isoc2ode DB field.
+
+.. code-block:: typoscript
+
+       # danish by default
+       config.sys_language_uid = 0
+       config.sys_language_isocode_default = da
+
+       [globalVar = GP:L = 1]
+               # isocode is filled by the respective DB value from sys_language (uid 1)
+               config.sys_language_uid = 1
+
+               # you can override this of course
+               config.sys_language_isocode = fr
+       [GLOBAL]
+
+The new field can be used in any TypoScript variable like
+
+.. code-block:: typoscript
+
+       page.10 = TEXT
+       page.10.data = TSFE:sys_language_isocode
+       page.10.wrap = <div class="main" data-language="|">
+
+Backend:
+
+All ISO code usages based on sys_language in the Backend (FormEngine, Translation Tools) is now done via the new field
+but still uses static_info_tables as fallback if already in use.
+
+Each sys_language record is now editable with the new DB field to select the respective ISO 639-1 code.
+
+Migration
+=========
+
+The upgrade wizard makes sure that the new DB field is filled properly so no deprecation warnings are written
+if static_info_tables in conjunction with the DB field "static_lang_isocode" was used before. If this field is
+used in a 3rd party extension, the extension developers and site integrators need to make sure it is switched
+to the new DB field sys_language.language_isocode.
+
+If a site uses multiple languages without static_info_tables each sys_language record should be modified to select
+the proper ISO 639-1 code for the langauges.
\ No newline at end of file
diff --git a/typo3/sysext/core/Resources/Private/Language/db.xlf b/typo3/sysext/core/Resources/Private/Language/db.xlf
new file mode 100644 (file)
index 0000000..702508e
--- /dev/null
@@ -0,0 +1,560 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xliff version="1.0">
+       <file source-language="en" datatype="plaintext" original="messages" date="2014-09-10T14:22:34Z" product-name="core">
+               <header/>
+               <body>
+                       <trans-unit id="sys_language.language_isocode.ab" xml:space="preserve">
+                               <source>Abkhaz</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.aa" xml:space="preserve">
+                               <source>Afar</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.af" xml:space="preserve">
+                               <source>Afrikaans</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ak" xml:space="preserve">
+                               <source>Akan</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.sq" xml:space="preserve">
+                               <source>Albanian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.am" xml:space="preserve">
+                               <source>Amharic</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ar" xml:space="preserve">
+                               <source>Arabic</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.an" xml:space="preserve">
+                               <source>Aragonese</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.hy" xml:space="preserve">
+                               <source>Armenian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.as" xml:space="preserve">
+                               <source>Assamese</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.av" xml:space="preserve">
+                               <source>Avaric</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ae" xml:space="preserve">
+                               <source>Avestan</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ay" xml:space="preserve">
+                               <source>Aymara</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.az" xml:space="preserve">
+                               <source>Azerbaijani</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.bm" xml:space="preserve">
+                               <source>Bambara</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ba" xml:space="preserve">
+                               <source>Bashkir</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.eu" xml:space="preserve">
+                               <source>Basque</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.be" xml:space="preserve">
+                               <source>Belarusian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.bn" xml:space="preserve">
+                               <source>Bengali, Bangla</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.bh" xml:space="preserve">
+                               <source>Bihari</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.bi" xml:space="preserve">
+                               <source>Bislama</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.bs" xml:space="preserve">
+                               <source>Bosnian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.br" xml:space="preserve">
+                               <source>Breton</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.bg" xml:space="preserve">
+                               <source>Bulgarian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.my" xml:space="preserve">
+                               <source>Burmese</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ca" xml:space="preserve">
+                               <source>Catalan, Valencian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ch" xml:space="preserve">
+                               <source>Chamorro</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ce" xml:space="preserve">
+                               <source>Chechen</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ny" xml:space="preserve">
+                               <source>Chichewa, Chewa, Nyanja</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.zh" xml:space="preserve">
+                               <source>Chinese</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.cv" xml:space="preserve">
+                               <source>Chuvash</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.kw" xml:space="preserve">
+                               <source>Cornish</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.co" xml:space="preserve">
+                               <source>Corsican</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.cr" xml:space="preserve">
+                               <source>Cree</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.hr" xml:space="preserve">
+                               <source>Croatian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.cs" xml:space="preserve">
+                               <source>Czech</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.da" xml:space="preserve">
+                               <source>Danish</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.dv" xml:space="preserve">
+                               <source>Divehi, Dhivehi, Maldivian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.nl" xml:space="preserve">
+                               <source>Dutch</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.dz" xml:space="preserve">
+                               <source>Dzongkha</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.en" xml:space="preserve">
+                               <source>English</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.eo" xml:space="preserve">
+                               <source>Esperanto</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.et" xml:space="preserve">
+                               <source>Estonian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ee" xml:space="preserve">
+                               <source>Ewe</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.fo" xml:space="preserve">
+                               <source>Faroese</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.fj" xml:space="preserve">
+                               <source>Fijian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.fi" xml:space="preserve">
+                               <source>Finnish</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.fr" xml:space="preserve">
+                               <source>French</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ff" xml:space="preserve">
+                               <source>Fula, Fulah, Pulaar, Pular</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.gl" xml:space="preserve">
+                               <source>Galician</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ka" xml:space="preserve">
+                               <source>Georgian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.de" xml:space="preserve">
+                               <source>German</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.el" xml:space="preserve">
+                               <source>Greek (modern)</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.gn" xml:space="preserve">
+                               <source>Guaraní</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.gu" xml:space="preserve">
+                               <source>Gujarati</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ht" xml:space="preserve">
+                               <source>Haitian, Haitian Creole</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ha" xml:space="preserve">
+                               <source>Hausa</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.he" xml:space="preserve">
+                               <source>Hebrew (modern)</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.hz" xml:space="preserve">
+                               <source>Herero</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.hi" xml:space="preserve">
+                               <source>Hindi</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ho" xml:space="preserve">
+                               <source>Hiri Motu</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.hu" xml:space="preserve">
+                               <source>Hungarian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ia" xml:space="preserve">
+                               <source>Interlingua</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.id" xml:space="preserve">
+                               <source>Indonesian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ie" xml:space="preserve">
+                               <source>Interlingue</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ga" xml:space="preserve">
+                               <source>Irish</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ig" xml:space="preserve">
+                               <source>Igbo</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ik" xml:space="preserve">
+                               <source>Inupiaq</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.io" xml:space="preserve">
+                               <source>Ido</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.is" xml:space="preserve">
+                               <source>Icelandic</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.it" xml:space="preserve">
+                               <source>Italian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.iu" xml:space="preserve">
+                               <source>Inuktitut</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ja" xml:space="preserve">
+                               <source>Japanese</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.jv" xml:space="preserve">
+                               <source>Javanese</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.kl" xml:space="preserve">
+                               <source>Kalaallisut, Greenlandic</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.kn" xml:space="preserve">
+                               <source>Kannada</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.kr" xml:space="preserve">
+                               <source>Kanuri</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ks" xml:space="preserve">
+                               <source>Kashmiri</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.kk" xml:space="preserve">
+                               <source>Kazakh</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.km" xml:space="preserve">
+                               <source>Khmer</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ki" xml:space="preserve">
+                               <source>Kikuyu, Gikuyu</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.rw" xml:space="preserve">
+                               <source>Kinyarwanda</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ky" xml:space="preserve">
+                               <source>Kyrgyz</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.kv" xml:space="preserve">
+                               <source>Komi</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.kg" xml:space="preserve">
+                               <source>Kongo</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ko" xml:space="preserve">
+                               <source>Korean</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ku" xml:space="preserve">
+                               <source>Kurdish</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.kj" xml:space="preserve">
+                               <source>Kwanyama, Kuanyama</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.la" xml:space="preserve">
+                               <source>Latin</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.lb" xml:space="preserve">
+                               <source>Luxembourgish, Letzeburgesch</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.lg" xml:space="preserve">
+                               <source>Ganda</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.li" xml:space="preserve">
+                               <source>Limburgish, Limburgan, Limburger</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ln" xml:space="preserve">
+                               <source>Lingala</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.lo" xml:space="preserve">
+                               <source>Lao</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.lt" xml:space="preserve">
+                               <source>Lithuanian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.lu" xml:space="preserve">
+                               <source>Luba-Katanga</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.lv" xml:space="preserve">
+                               <source>Latvian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.gv" xml:space="preserve">
+                               <source>Manx</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.mk" xml:space="preserve">
+                               <source>Macedonian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.mg" xml:space="preserve">
+                               <source>Malagasy</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ms" xml:space="preserve">
+                               <source>Malay</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ml" xml:space="preserve">
+                               <source>Malayalam</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.mt" xml:space="preserve">
+                               <source>Maltese</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.mi" xml:space="preserve">
+                               <source>Māori</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.mr" xml:space="preserve">
+                               <source>Marathi (Marāṭhī)</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.mh" xml:space="preserve">
+                               <source>Marshallese</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.mn" xml:space="preserve">
+                               <source>Mongolian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.na" xml:space="preserve">
+                               <source>Nauru</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.nv" xml:space="preserve">
+                               <source>Navajo, Navaho</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.nd" xml:space="preserve">
+                               <source>Northern Ndebele</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ne" xml:space="preserve">
+                               <source>Nepali</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ng" xml:space="preserve">
+                               <source>Ndonga</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.nb" xml:space="preserve">
+                               <source>Norwegian Bokmål</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.nn" xml:space="preserve">
+                               <source>Norwegian Nynorsk</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.no" xml:space="preserve">
+                               <source>Norwegian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ii" xml:space="preserve">
+                               <source>Nuosu</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.nr" xml:space="preserve">
+                               <source>Southern Ndebele</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.oc" xml:space="preserve">
+                               <source>Occitan</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.oj" xml:space="preserve">
+                               <source>Ojibwe, Ojibwa</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.cu" xml:space="preserve">
+                               <source>Old Church Slavonic, Church Slavonic, Old Bulgarian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.om" xml:space="preserve">
+                               <source>Oromo</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.or" xml:space="preserve">
+                               <source>Oriya</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.os" xml:space="preserve">
+                               <source>Ossetian, Ossetic</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.pa" xml:space="preserve">
+                               <source>Panjabi, Punjabi</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.pi" xml:space="preserve">
+                               <source>Pāli</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.fa" xml:space="preserve">
+                               <source>Persian (Farsi)</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.pl" xml:space="preserve">
+                               <source>Polish</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ps" xml:space="preserve">
+                               <source>Pashto, Pushto</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.pt" xml:space="preserve">
+                               <source>Portuguese</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.qu" xml:space="preserve">
+                               <source>Quechua</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.rm" xml:space="preserve">
+                               <source>Romansh</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.rn" xml:space="preserve">
+                               <source>Kirundi</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ro" xml:space="preserve">
+                               <source>Romanian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ru" xml:space="preserve">
+                               <source>Russian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.sa" xml:space="preserve">
+                               <source>Sanskrit (Saṁskṛta)</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.sc" xml:space="preserve">
+                               <source>Sardinian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.sd" xml:space="preserve">
+                               <source>Sindhi</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.se" xml:space="preserve">
+                               <source>Northern Sami</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.sm" xml:space="preserve">
+                               <source>Samoan</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.sg" xml:space="preserve">
+                               <source>Sango</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.sr" xml:space="preserve">
+                               <source>Serbian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.gd" xml:space="preserve">
+                               <source>Scottish Gaelic, Gaelic</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.sn" xml:space="preserve">
+                               <source>Shona</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.si" xml:space="preserve">
+                               <source>Sinhala, Sinhalese</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.sk" xml:space="preserve">
+                               <source>Slovak</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.sl" xml:space="preserve">
+                               <source>Slovene</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.so" xml:space="preserve">
+                               <source>Somali</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.st" xml:space="preserve">
+                               <source>Southern Sotho</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.es" xml:space="preserve">
+                               <source>Spanish, Castilian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.su" xml:space="preserve">
+                               <source>Sundanese</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.sw" xml:space="preserve">
+                               <source>Swahili</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ss" xml:space="preserve">
+                               <source>Swati</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.sv" xml:space="preserve">
+                               <source>Swedish</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ta" xml:space="preserve">
+                               <source>Tamil</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.te" xml:space="preserve">
+                               <source>Telugu</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.tg" xml:space="preserve">
+                               <source>Tajik</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.th" xml:space="preserve">
+                               <source>Thai</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ti" xml:space="preserve">
+                               <source>Tigrinya</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.bo" xml:space="preserve">
+                               <source>Tibetan Standard, Tibetan, Central</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.tk" xml:space="preserve">
+                               <source>Turkmen</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.tl" xml:space="preserve">
+                               <source>Tagalog</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.tn" xml:space="preserve">
+                               <source>Tswana</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.to" xml:space="preserve">
+                               <source>Tonga (Tonga Islands)</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.tr" xml:space="preserve">
+                               <source>Turkish</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ts" xml:space="preserve">
+                               <source>Tsonga</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.tt" xml:space="preserve">
+                               <source>Tatar</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.tw" xml:space="preserve">
+                               <source>Twi</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ty" xml:space="preserve">
+                               <source>Tahitian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ug" xml:space="preserve">
+                               <source>Uyghur, Uighur</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.uk" xml:space="preserve">
+                               <source>Ukrainian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ur" xml:space="preserve">
+                               <source>Urdu</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.uz" xml:space="preserve">
+                               <source>Uzbek</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.ve" xml:space="preserve">
+                               <source>Venda</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.vi" xml:space="preserve">
+                               <source>Vietnamese</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.vo" xml:space="preserve">
+                               <source>Volapük</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.wa" xml:space="preserve">
+                               <source>Walloon</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.cy" xml:space="preserve">
+                               <source>Welsh</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.wo" xml:space="preserve">
+                               <source>Wolof</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.fy" xml:space="preserve">
+                               <source>Western Frisian</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.xh" xml:space="preserve">
+                               <source>Xhosa</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.yi" xml:space="preserve">
+                               <source>Yiddish</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.yo" xml:space="preserve">
+                               <source>Yoruba</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.za" xml:space="preserve">
+                               <source>Zhuang, Chuang</source>
+                       </trans-unit>
+                       <trans-unit id="sys_language.language_isocode.zu" xml:space="preserve">
+                               <source>Zulu</source>
+                       </trans-unit>
+               </body>
+       </file>
+</xliff>
\ No newline at end of file
index 5cfef69..9bb71ea 100644 (file)
@@ -645,6 +645,7 @@ CREATE TABLE sys_language (
   hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
   title varchar(80) DEFAULT '' NOT NULL,
   flag varchar(20) DEFAULT '' NOT NULL,
+  language_isocode varchar(2) DEFAULT '' NOT NULL,
   static_lang_isocode int(11) unsigned DEFAULT '0' NOT NULL,
   PRIMARY KEY (uid),
   KEY parent (pid)
index 700ac29..3626fbe 100644 (file)
@@ -567,8 +567,7 @@ class TypoScriptFrontendController {
 
        /**
         * Is set to the iso code of the sys_language_content if that is properly defined
-        * by the sys_language record representing the sys_language_uid. (Requires the
-        * extension "static_info_tables")
+        * by the sys_language record representing the sys_language_uid.
         * @var string
         */
        public $sys_language_isocode = '';
@@ -2558,17 +2557,38 @@ class TypoScriptFrontendController {
                        $this->pageNotFoundAndExit($message);
                }
                $this->updateRootLinesWithTranslations();
-               // Finding the ISO code:
-               if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('static_info_tables') && $this->sys_language_content) {
+
+               // Finding the ISO code for the currently selected language
+               // fetched by the sys_language record when not fetching content from the default language
+               if ($this->sys_language_content > 0) {
                        // using sys_language_content because the ISO code only (currently) affect content selection from FlexForms - which should follow "sys_language_content"
                        // Set the fourth parameter to TRUE in the next two getRawRecord() calls to
                        // avoid versioning overlay to be applied as it generates an SQL error
-                       $sys_language_row = $this->sys_page->getRawRecord('sys_language', $this->sys_language_content, 'static_lang_isocode', TRUE);
-                       if (is_array($sys_language_row) && $sys_language_row['static_lang_isocode']) {
-                               $stLrow = $this->sys_page->getRawRecord('static_languages', $sys_language_row['static_lang_isocode'], 'lg_iso_2', TRUE);
-                               $this->sys_language_isocode = $stLrow['lg_iso_2'];
+                       $sys_language_row = $this->sys_page->getRawRecord('sys_language', $this->sys_language_content, 'language_isocode,static_lang_isocode', TRUE);
+                       if (is_array($sys_language_row)) {
+                               if (!empty($sys_language_row['language_isocode'])) {
+                                       $this->sys_language_isocode = $sys_language_row['language_isocode'];
+                               } elseif ($sys_language_row['static_lang_isocode'] && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('static_info_tables')) {
+                                       GeneralUtility::deprecationLog('Usage of the field "static_lang_isocode" is discouraged, and will stop working with CMS 8. Use the built-in language field "language_isocode" in your sys_language records.');
+                                       $stLrow = $this->sys_page->getRawRecord('static_languages', $sys_language_row['static_lang_isocode'], 'lg_iso_2', TRUE);
+                                       $this->sys_language_isocode = $stLrow['lg_iso_2'];
+                               }
+                       }
+                       // the DB value is overriden by TypoScript
+                       if (!empty($this->config['config']['sys_language_isocode'])) {
+                               $this->sys_language_isocode = $this->config['config']['sys_language_isocode'];
+                       }
+               } else {
+                       // fallback to the TypoScript option when rendering with sys_language_uid=0
+                       // also: use "en" by default
+                       if (!empty($this->config['config']['sys_language_isocode_default'])) {
+                               $this->sys_language_isocode = $this->config['config']['sys_language_isocode_default'];
+                       } else {
+                               $this->sys_language_isocode = $this->lang != 'default' ? $this->lang : 'en';
                        }
                }
+
+
                // Setting softMergeIfNotBlank:
                $table_fields = GeneralUtility::trimExplode(',', $this->config['config']['sys_language_softMergeIfNotBlank'], TRUE);
                foreach ($table_fields as $TF) {
index 63a81cc..9deaf96 100644 (file)
@@ -268,7 +268,7 @@ class PageGenerator {
                // Reset the content variables:
                $GLOBALS['TSFE']->content = '';
                $htmlTagAttributes = array();
-               $htmlLang = $GLOBALS['TSFE']->config['config']['htmlTag_langKey'] ?: 'en';
+               $htmlLang = $GLOBALS['TSFE']->config['config']['htmlTag_langKey'] ?: ($GLOBALS['TSFE']->sys_language_isocode ?: 'en');
                // Set content direction: (More info: http://www.tau.ac.il/~danon/Hebrew/HTML_and_Hebrew.html)
                if ($GLOBALS['TSFE']->config['config']['htmlTag_dir']) {
                        $htmlTagAttributes['dir'] = htmlspecialchars($GLOBALS['TSFE']->config['config']['htmlTag_dir']);
diff --git a/typo3/sysext/install/Classes/Updates/LanguageIsoCodeUpdate.php b/typo3/sysext/install/Classes/Updates/LanguageIsoCodeUpdate.php
new file mode 100644 (file)
index 0000000..53b939a
--- /dev/null
@@ -0,0 +1,80 @@
+<?php
+namespace TYPO3\CMS\Install\Updates;
+
+/**
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+/**
+ * Update sys_language records to use the newly created
+ * field language_isocode, if they have used the now deprecated
+ * static_lang_isocode
+ */
+class LanguageIsoCodeUpdate extends AbstractUpdate {
+
+       /**
+        * @var string
+        */
+       protected $title = 'Update sys_language records to use new ISO 639-1 letter-code field';
+
+       /**
+        * Checks if an update is needed
+        *
+        * @param string &$description The description for the update
+        * @return bool Whether an update is needed (TRUE) or not (FALSE)
+        */
+       public function checkForUpdate(&$description) {
+               if ($this->isWizardDone()) {
+                       return FALSE;
+               }
+
+               $migratableLanguageRecords = $this->getDatabaseConnection()->exec_SELECTcountRows('uid', 'sys_language', 'language_isocode="" AND static_lang_isocode!=""');
+               if ($migratableLanguageRecords === 0) {
+                       return FALSE;
+               }
+
+               $description = 'The sys_language records have a new iso code field which removes the dependency of the TYPO3 CMS Core to the extension "static_info_tables". This upgrade wizard migrates the data of the existing "static_lang_isocode" field to the new DB field.';
+
+               return TRUE;
+       }
+
+       /**
+        * Performs the database update if the old field "static_lang_isocode"
+        * is in use and populates the new field "language_isocode" with the
+        * data of the old relation.
+        *
+        * @param array &$databaseQueries Queries done in this update
+        * @param mixed &$customMessages Custom messages
+        * @return bool
+        */
+       public function performUpdate(array &$databaseQueries, &$customMessages) {
+               $migrateableLanguageRecords = $this->getDatabaseConnection()->exec_SELECTgetRows('uid,static_lang_isocode', 'sys_language', 'language_isocode="" AND static_lang_isocode!=""');
+               if (!empty($migrateableLanguageRecords)) {
+                       foreach ($migrateableLanguageRecords as $languageRecord) {
+                               $staticLanguageRecord = $this->getDatabaseConnection()->exec_SELECTgetSingleRow('*', 'static_languages', 'uid=' . (int)$languageRecord['static_lang_isocode']);
+                               if (!empty($staticLanguageRecord['lg_iso_2'])) {
+                                       $this->getDatabaseConnection()->exec_UPDATEquery(
+                                               'sys_language',
+                                               'uid=' . (int)$languageRecord['uid'],
+                                               array(
+                                                       'language_isocode' => strtolower($staticLanguageRecord['lg_iso_2'])
+                                               )
+                                       );
+                                       $databaseQueries[] = $this->getDatabaseConnection()->debug_lastBuiltQuery;
+                               }
+                       }
+               }
+
+               $this->markWizardAsDone();
+               return TRUE;
+       }
+}
index a15bd50..f00f563 100644 (file)
@@ -4,8 +4,9 @@ defined('TYPO3_MODE') or die();
 // All versions
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['changeCompatibilityVersion'] = 'TYPO3\\CMS\\Install\\Updates\\CompatVersionUpdate';
 
-// TYPO3 7
+// TYPO3 CMS 7
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['backendUserStartModule'] = 'TYPO3\\CMS\\Install\\Updates\\BackendUserStartModuleUpdate';
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['languageIsoCode'] = 'TYPO3\\CMS\\Install\\Updates\\LanguageIsoCodeUpdate';
 
 $signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
 $signalSlotDispatcher->connect(
index 3e94b7e..a63ca00 100644 (file)
                        <trans-unit id="sys_language.isocode" xml:space="preserve">
                                <source>Select Official Language (ISO code):</source>
                        </trans-unit>
+                       <trans-unit id="sys_language.language_isocode" xml:space="preserve">
+                               <source>Select language:</source>
+                       </trans-unit>
                        <trans-unit id="sys_language.flag" xml:space="preserve">
                                <source>Select flag icon:</source>
                        </trans-unit>