[TYPO3-core] RFC: Name of the default language

Dmitry Dulepov dima at spamcop.net
Wed Jan 11 08:27:41 CET 2006


Hi all!

As I saw from the discussion of my patch for indexed_search and mailing
lists, name of the default language is a problem for many people. All
other languages are defined in the database tables, only default
language is left out.

Name of the default language is needed in both FE and BE. For the BE
there is a [yet undocumented] property for the mod.SHARED in the page
TSConfig that contains name, isoCode and flag of the language. Currently
only TemplaVoila uses it.

FE does not have such common property. Various extensions use their own
unique properties.

It makes sence to make a common property for the FE as well. Such
property should be defined in the template. It cannot be system-wide
because various parts of the tree can have various default languages.
Thus I propose to add a set of new non-mandatory properties to the
"config.language" entry:

config.language {
	title = English
	isoCode = en
	flag = media/flags/flag_uk.gif
}

It will work as a source of information for the default language
(config.sys_language_uid=0) and allow to add new languages or override
title/flag for existing language (isoCode can be changed for existing
language only if it was not loaded from static_languages).

This change will require the folowing changes in tslib_fe class:
- additions of new attributes: sys_language_title and sys_language_flag
- changes in settingLanguage() function to override values obtained from
database or fill new attributes from config in case of default language
- public functions to retrieve language title, isoCode and flag
information (I am against direct usage of class attributes!)

This change ensures compatibility with previous versions of Typo3.

What do you think? Does it make sence to perform such change?

Dmitry.



More information about the TYPO3-team-core mailing list