[TYPO3-dev] Setting config.htmlTag_langKey
Ernesto Baschny [cron IT]
ernst at cron-it.de
Wed Dec 5 13:17:36 CET 2007
Benjamin Mack wrote: on 05.12.2007 12:06:
> just found out that config.htmlTag_langKey is automatically set to "en"
> all the time. AFAIKS this is used for defining the language of the
> webpage (when using XHTML and in the HTML tag), so it's another option
> to set.
>
> So right now we have
>
> if langKey isset => use langKey
> otherwise "en"
>
> What do you think about this?
>
> if langKey isset => use langKey
> else if config.language is set use config.language
> else use "en"
The only "problem" with that is that config.language is not 100%
compatible with RFC 1766, which uses the ISO definitions of language.
In config.language we use TYPO3-internal 2-digit shortcuts. Most of them
match the ISO definition, but some don't.
For example Greek is "gr" in TYPO3, but "el" in ISO definition. See
$t3lib_cs::isoArray variable for a list of mismatches.
Maybe we could use this mapping table to translate them to ISO
corresponding, but there are some changes needed, for example "br"
should be "pt-BR", "ch" => "zh-CN" (in an lang attribute), etc. Maybe
add a second mapping for RFC-1766 conformance. Masi should know more
about it, as he is the language specialist. :)
Cheers,
Ernesto
More information about the TYPO3-dev
mailing list