Project

General

Profile

Actions

Feature #29354

closed

Power up sys_language

Added by Felix Kopp about 13 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-08-30
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Working on a feature to put the language and country codes into the sys_language table.
Following this prerequisite a few bounds could be lowered.

The overall target is to enable the admin to add new languages (overlay) via the backend without having the need to add typoscript anywhere.

Status

At the moment the L-parameter must be linked, no problem and won't change. The config.sys_language_uid must be set vie typoscript. The config.language must be set via typoscript and the config.htmlTag_setParams or config.htmlTag_langKey should be set.

Target

This feature should take care of these steps:

(1) Set the sys_language_uid from database sys_language.uid

(2) Set the locale from language_country for the frontend (discussion: what if locale not installed?).

(3) Set the htmlParams "xml:lang" from sys_language.language and "lang" from sys_language.language plus sys_language.country

(4) Enable realurl to pick the correct value "speaking url part" from the database without valuemap, but lookupTable.

What do we need?

New database fields:

sys_language.language (required)

VARCHAR for two char language code according to ISO 639-1
-> This could also become a three letter field for ISO 639-1 codes like "cal".
further reading: http://www.loc.gov/standards/iso639-2/php/code_changes.php

sys_language.country

VARCHAR for the country code according to ISO 3166
further reading: http://www.iso.org/iso/country_codes/iso-3166-1_decoding_table.htm

Encoding

To set the locale sometimes the encoding must be prepended (e.g. de_DE.utf8).
What about the @Euro-zone like de_DE@euro).
further reading: http://php.net/manual/de/function.setlocale.php

TS configuration

A new configuration flag to tell TYPO3 to lookup the values for language, like config.languageVar. This parameter will automatically be added to the uniqueLinkvars and set the sys_language_uid.

Allow htmlTag_setParams / htmlTag_langKey to retrieve the language-key (+ country-key) input from the database or TSFE like de-DE or en-GB.

To be discussed

Shall be also implement a feature to set the values for the standard language somewhere in the database or should the standard-language be configured within of typoscript? A possible location for the data could be the registry.
+ Based on this configuration we could display the correct 'Title' of the language within TCEFORMS instead of 'default'.

Security-matter

Why is there the difference between the sys_language_uid and parameter L (mostly L but not a convention)? Does anyone disagree with setting the config.sys_language.uid directly from the get-Parameter, of course after massive int-validation.

Performance

Does it make sense to fire up a database-request in advanced to determine the current language?

Summary

This of course only makes sense in a setup where no further configurations, labels, typoscript must be configured. But I guess the large palette of standard translations bring quite some comfort. A admin only has to add the sys_language and retrieve the standard translations from the ext manager to add a new language.

Actions

Also available in: Atom PDF