[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)
commitf1e399f3d86acc2d58b398608a25f26d35e096a6
tree5a1e3f1f4ed84eda17fe85f760e357c8930e7dd2
parenta919c7ce1836f901ccd7d0b6017f9e2f035c4ec7
[DB][FEATURE] Add ISO 639-1 keys to sys_language

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