[TYPO3] Multilanguage One-tree configuration
Andreas Burg
typo3 at andreasburg.de
Tue Aug 5 13:48:42 CEST 2008
Alexandra Oink schrieb:
> config.linkVars = L
>
> # Spanish language, sys_language.uid = 1
> [globalVar = GP:L = 1]
> config.sys_language_uid = 1
> config.language = es
> [global]
>
> # English language, sys_language.uid = 2
> [globalVar = GP:L = 2]
> config.sys_language_uid = 2
> config.language = en
> [global]
>
> But is´s still not working.
Hi Alexandra, you have to use the language UIDs given you by YOUR TYPO3. You find it by clicking on
list module, then clicking on the globe and pointing the mouse over the language symbol. f.e. MY
english is 0 and MY german is 9
> *>* mod.SHARED.defaultLanguageLabel = Español
> *>* mod.SHARED.defaultLanguageFlag = /typo3/gfx/flags/es.gif
> *
> This mod.SHARED goes to pageTS but has nothing to do with your problem.
so you see "Espanol" and the flag in the BE instead of "default"
>
and this goes to your main-TS-template where you config your site (remember: nobody but YOU knows
YOUR own language UIDs, you have to find them out first)
>> * config.linkVars = L
> *>* config.sys_language_uid = 0
> *>* config.language = es
> *>* config.locale_all = spanish
> *>*
> *>* [globalVar = GP:L = 0]
> *>* config.sys_language_uid = 0
> *>* config.language = es
> *>* config.locale_all = spanish
> *
> You do not need to define this twice
I also define it twice, the one without global for that case when there is no L-parameter given.
Don't know if it's correct, found it on the internet given by a pro.
please also use f.e. for the english language:
locale_all = en_GB.utf8 (if this lang is installed on your server)
to beware of getting unwanted formating when using things like dates, times and other country
specific data
htmlTag_langKey = en
to declare the contents of your html page to the given language
Please close every opened global, also don't know if its really needed, but it looks better in my
opinion and it's not fault.
[globalVar]
>
>> * [globalVar=GP:L=2]
> *>* config.sys_language_uid = 2
> *>* config.language = en
> *>* config.locale_all = english (this did not work on every server)
> *
> Why don't you have sys_language_uid = 1? Did you make an error when
> creating language records?
this happens when you delete and create languages.
To find out the correct locale_all belonging to your server, you can run this little php-file on
your server. (perhaps it did not work on all servers)
<?php
echo "<pre>";
system("locale -a");
echo "</pre>";
?>
At least I show you how MY config regarding to language settings looks like (remember, it's in the
setup of your main-TS-template:
# Konfiguration Default English
config {
sys_language_uid = 0
language = en
locale_all = en_GB.utf8
htmlTag_langKey = en
}
# Konfiguration English
[globalVar = GP:L = 0]
config {
sys_language_uid = 0
language = en
locale_all = en_GB.utf8
htmlTag_langKey = en
}
[global]
# Konfiguration Deutsch
[globalVar = GP:L = 9]
config {
sys_language_uid = 9
language = de
locale_all = de_DE.utf8
htmlTag_langKey = de
}
[global]
hope this helps
keep on, Andreas
More information about the TYPO3-english
mailing list