[TYPO3-english] Multilanguage: Switching language gets back todefault
Viktor Livakivskyi
v-tyok at mail.ru
Tue Jul 31 13:09:49 CEST 2012
Hi, Toni.
> Now the problem is, when i switch to Eng version, then i click on menu
> link, my page opens and my "&L=1 or 0" is gone and content, menu and
> everything is back to default (Croatian).
>
> My TS:
>
> config {
> linkVars = L
> sys_language_mode = content_fallback
> sys_language_overlay = content_fallback
> sys_language_uid = 0
> language = hr
> locale_all = hr_HR
> }
>
> # Croatian
> [globalVar = GP:L=0]
> config {
> sys_language_uid = 0
> language = hr
> locale_all = hr_HR.UTF-8
> }
> [global]
>
> #English
> [globalVar = GP:L=1]
> config {
> sys_language_uid = 1
> language = en
> locale_all = en_EN.UTF-8
> }
> [global]
There is a localization specification, that always gives a pain to a new
TYPO3 developers)
English is always default language in locallang.xml (xlf) files. Even if you
don't have English on your websitem but have, let's say: Croatian and
German, you need to have English, Croatian and German language labels in
your locallang files. That is done for BE - if you didn’t download any
transaltions, you should see all the labels in BE in most common language
(which is English).
But FE is a bit different. You can define default language by yourself. So,
in your case Croatian is default (L=0) and English is secondary (L=1).
So, you don't need section inside: [globalVar = GP:L=0] - you may safely
remove it and any other same sections, if you have them.
As for wrong menu links: can you, please, tell us, what TYPO3 version is
used, how menus are generated and check, don't you have somewhere in code:
config.linkVars >
That config option holds variables, that are always added to links, if they
are set. Since you have set it to 'L', it should be added. So, probably it
is unset somewhere or, if you're using RealURL, it might be inset by it's
configs.
> And another problem is on my "home" page (has its own template, not much
> diferent from template for other pages) shows default lang, eng language
> and croatian lang contents and i checked the diference between templates
> for "home" and "other pages" and couldnt find the problem.
>
> ps. Should i use Croatian as default + English lang, or def+eng+cro? I ask
> this cause i read somewhere that default lang "isnt" a sites language in
> some way (dont get that part tbh).
See above. Just remove [L=0] sections ;)
More information about the TYPO3-english
mailing list