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 #1

Updated by Steffen Ritter over 12 years ago

  • Target version deleted (4.7.0)
Actions #2

Updated by Felix Kopp over 11 years ago

  • Status changed from New to Closed
Actions #3

Updated by Camelia M over 11 years ago

  • Status changed from Closed to New

Why is this closed? This is a great idea. It would ease up multilanguage sites setup a lot, especially if you use a lot of languages.
At this point language menus are mostly 'hard-coded' as tsref teaches us here: http://docs.typo3.org/typo3cms/TyposcriptReference/ContentObjects/Hmenu/Index.html#id1. Instead of enumerating over and over again all languages id's and their names and flags (when creating language menu, when creating language ts setup, when creating realurl setup, etc), it would be a lot easier if the information already in the database could be used.
Therefore, I would also extend it a bit further and give 'read access' to these tables from content objects (at this point one cannot select from sys_language tables with typoscript), so one can create a dynamic language menu, that could have tens of languages with just a few typoscript lines, without adding redundant data & setup (like language name - which was already added at language creation, or flag, etc).
Having these tables 'readable' by typoscript could enhance languages functionality a lot, and one could also create a more complex language menu, also easier to maintain.

Actions #4

Updated by Mathias Schreiber almost 10 years ago

  • Status changed from New to Closed

Will be replaced with a strong default for languages as well as with a new multi-channel feature

Actions

Also available in: Atom PDF