[TYPO3] Single page localization
Xavier Perseguers
typo3 at perseguers.ch
Tue Feb 5 15:39:19 CET 2008
Hello,
Is there a best practice to set the language of a single page? The problem is how to change settings such as
xml:lang and lang attributes in
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
and in meta tags too:
<meta name="language" content="fr" />
<meta name="DC.Language" scheme="RFC3066" content="fr-CH" />
For a few pages in my website to be for instance in English instead of the standard French that was specified by TS.
The way I found - when I have a whole subtree of pages in English - was to create an extension template where I override these
parameters. This is however not as user-friendly as it could be if I were able to define it once somewhere in the page properties, near to the title, subtitle or abstract in advanced mode.
I could not manage either to change it using the pageTS field. Perhaps I missed something?
The question is *not" how to make my website support multiple languages, I know this, but only how I may define the language of single pages.
What I made with the extension template, was to write an "include" statement in Setup:
<INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/templates/ts/english.txt">
where english.txt contains something like that:
config.language = en
page.config.htmlTag_langKey = en
page.meta.language = en
But I do not like the idea of being forced to create an extension template for each page I want to be in another language.
Thanks for helping
Xavier
More information about the TYPO3-english
mailing list