Reputation: 93
I use TYPO3 8 with the introduction package (bootstrap). I have added a additional language to my site. Everything works fine, but if I switch the the second language on the frontend, TYPO3 displays the content in both languages. Any hints?
Upvotes: 0
Views: 426
Reputation: 11
Found a dirty solution to solve it. Had the same problem here. Translations seem to work fine in backend. Database entries look good. I created many multilingual websites with TYPO3. But this time... I have a onepage and created the sections with help of HMENU. At my side, gridelements was the problem since it wrote out both languages.
In file typo3conf/ext/gridelements/Classes/Plugin/Gridelements.php
I changed line 313 from
AND sys_language_uid IN (-1,0)
to
AND sys_language_uid IN (-1,' . $this->getTSFE()->sys_language_content . ')
I know it's not really a satisfying solution, but may help you out for now ;) Worked in TYPO3 7.6.23 and gridelements 7.1.0.
Upvotes: 1
Reputation: 3207
Use below language configuration typoscript.
config {
linkVars = L
sys_language_mode = content_fallback
sys_language_overlay = 1
locale_all = en_EN
sys_language_uid = 0
htmlTag_langKey = en-EN
language = en
}
[globalVar = GP:L = 1]
config.sys_language_uid = 1
config.language = de
config.locale_all = de_DE
config.htmlTag_langKey = de-DE
[global]
Upvotes: 0
Reputation: 4526
The page for the second language it's a page overlay ?
First of all please check in tt_content
the sys_language_uid
field, would be good to check this also for the pages
table this should be greater or equals with 0, if it's -1 this is the reason why you see the both contents.
After you've checked this try check the typoscript config:
config{
linkVars = L
sys_language_uid = 0
sys_language_overlay = 1
sys_language_mode = content_fallback # this recommended, if no content found for the selected language will be showed up the content from the default language
language = en
}
[globalVar = GP:L = 1]
config {
sys_language_uid = 1
language = de
locale_all = de_DE.UTF-8
htmlTag_setParams = lang="de" dir="ltr" class="no-js"
}
[global]
// and so on for all languages you use
Upvotes: 0