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

Robert Lemke robert at typo3.org
Wed Jan 11 09:45:45 CET 2006


Hi Dmitry,

On Wednesday, 11. January 2006 08:27, Dmitry Dulepov wrote:

 > 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.

yes, and the reason why I didn't document it yet is that I don't like the 
solution (see below).

 > 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?

Yes and no ... I'm a bit undecided about the TSconfig way. A more userfriendly 
way to define a language as the default language would be creating a new 
sys_language record and mark it as "default" (= add a new check box "default 
language"). The main disadvantage I see though is, that you create a record 
for the default language which you didn't do in the past = not backwards 
compatible.

More ideas?

robert
-- 
Robert Lemke
TYPO3 Association - Research & Development
Member of the board
http://association.typo3.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060111/315a128c/attachment.pgp 


More information about the TYPO3-team-core mailing list