TYPO3 - Translation doesn't show, always default language - typo3

(TYPO3 loading default language instead of translation) -> same story, but I can't fix it.
I do not have much experience in TYPO3 and I have the following problem at the moment.
Standard language is Dutch and I want a French translation. I have already translated a menu + page into French.
When I click on 'FR' (French) in the language select menu, the URL of index.php? Id = 215 & L = 0 changes to index.php? Id = 215 & L = 1, but the content remains in Futch.
I have srt_languagemenu installed and configured so that when the translation is not available, the language reference in the menu disappears. This works perfectly.
When I click on 'Save and open' from the backend after I did the translation, the normal standard (Dutch) page is also shown here.
Can someone tell me what I might do wrong or forgot to set?
TYPO3: 8.7.16
Thanks!
# Language Settings
# Default Language settings
config {
linkVars = L(0-1)
sys_language_uid = 0
sys_language_overlay = 0
sys_language_mode = content_fallback
page.config.language = nl
language = nl
locale_all = nl_NL.UTF-8
htmlTag_langKey = nl
htmlTag_setParams = lang="nl" dir="ltr" class="no-js"
}
# Language Frans
[globalVar = GP:L = 1]
config {
sys_language_uid = 1
htmlTag_langKey = fr_FR
language = fr_FR
locale_all = fr_FR.UTF-8
htmlTag_setParams = lang="fr" dir="ltr" class="no-js"
}
[global]
# REALURL
config.baseURL = {$siteUrl}
config.simulateStaticDocuments = 0
config.tx_realurl_enable = 1
config.prefixLocalAnchors = all

Can you please provide us your Typoscript section of config. including your conditions made for those languages?
Another possibile problem: On your root page you should have declared all languages of the system. You have to make sure, that the UID of each language record equals to the number of your L Parameter in the URI or at least the config. for this language must match it.

Related

Typo3 vhs language returns id instead of language

I try to setup a language menu with 3 different languages. For english and german its working. It shows the current language either as EN or DE. But when i switch to italian, it only shows the id (7) in the frontend.
My Code is:
{v:page.language(languages: 'EN,DE,IT', pageUid: '0', normalWhenNoLanguage: 'EN')
Lanugage setup:
[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]
[globalVar = GP:L = 2]
config {
sys_language_uid = 2
language = fr
locale_all = fr_FR.UTF-8
htmlTag_setParams = lang="fr" dir="ltr" class="no-js"
}
[global]
[globalVar = GP:L = 7]
config {
sys_language_uid = 7
language = it
locale_all = it_IT.UTF-8
htmlTag_setParams = lang="it" dir="ltr" class="no-js"
}
[global]
If the id is 7 and your array of languages only contains three elements, what do you expect?
The VH does not access the TS configuration. It can't as the VH can not influence conditions to select the 'requested' language. So it only can access the current language configuration.
The 8th element of three elements (= your first parameter to this VH: the array with the 2 character language codes) would be out of range and should not be accessed (and if you do as it is possible in some languages you get an security issue).

Typo3 CMS 8.7.15 // restrict search results to current language

I'm using the TYPO3 version TYPO3 CMS 8.7.15. with a multilanguage setup. Everything works fine. German is the default language. The other configured languages are english, portugeese and chinese. The problem is when I try to search keywords in different languages than the current language, i get results from the other translations. I want to ask for the right settings to display only search results in the current language from the current content.
config {
linkVars = L
uniqueLinkVars = 1
sys_language_mode = content_fallback
sys_language_overlay = 1
sys_language_uid = 0
locale_all = de_DE.UTF-8
htmlTag_langKey = de
language = de
}
plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 0
# SPRACHE: ENGLISCH
[globalVar = GP:L=6]
config {
sys_language_uid = 6
language = en
locale_all = en_GB.UTF-8
htmlTag_setParams = en
}
pugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 6
[global]
# SPRACHE: PORTUGIESISCH
[globalVar = GP:L=7]
config {
sys_language_uid = 7
language = pt
locale_all = pt_PT.UTF-8
htmlTag_setParams = pt
}
plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 7
[global]
# SPRACHE: CHINESISCH (EINFACH)
[globalVar = GP:L=8]
config {
sys_language_uid = 8
language = zh
locale_all = zh_CN.UTF-8
htmlTag_setParams = zh
}
plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang = 8
[global]
The only way to configure it right is the plugin.tx_indexedsearch._DEFAULT_PI_VARS.lang variable. But this has no effect to my search results. What is wrong with my configuration?
If you put your search field into your menu for example (fluidtemplate) the <f:form.hidden name="search[languageUid]"is not filled. So the results shows all languages.
I helped myself by using a lib that gives me the current language.
Fluid:
<f:form.hidden name="search[languageUid]" value="{f:cObject(typoscriptObjectPath: 'lib.language')}" />
Typoscript Setup:
# German language
temp.language = TEXT
temp.language.value = 0
# English language
[globalVar = GP:L = 1]
temp.language.value = 1
[global]
lib.language < temp.language

How to migrate content after Switching default language in TYPO3?

I have site with multi domain and having multi-language Italian and English in TYPO3 8.7.4. Now, before switching language my default language was English
here is configuration for this:
:: config ::
language = en
locale_all = english
sys_language_mode = content_fallback
htmlTag_langKey = en
sys_language_uid = 0
#Language configuration
[globalVar=GP:L=1]
config{
language = it
locale_all = italian
sys_language_mode = content_fallback
htmlTag_langKey = it
sys_language_uid = 1
}
[global]
:: Backend Mod ::
mod.SHARED {
defaultLanguageLabel = English
defaultLanguageFlag = en
}
Now, I want to change my TYPO3 site default language from English to Italian. So, I have done revert configuration like this:
:: config ::
language = it
locale_all = italian
sys_language_mode = content_fallback
htmlTag_langKey = it
sys_language_uid = 1
#Language configuration
[globalVar=GP:L=1]
config{
language = en
locale_all = english
sys_language_mode = content_fallback
htmlTag_langKey = en
sys_language_uid = 0
}
[global]
:: Backend Mod ::
mod.SHARED {
defaultLanguageLabel = Italian
defaultLanguageFlag = it
}
Now, I have issue with my existing content. How to migrate this content. It shows incorrectly. While I add content in Italian language it shows in English language. How can I fix this?
Switching default language after content has been added is not that easy. That would need DB migration due to language fields.
Take a look at this extension, it might be a good starting point: https://github.com/dschledermann/lfswaplang
In general: don't switch default languages in an existing project

Typo3 backend not multilanguest

In typoscript I have setup my website to support three languages. In the frontend it is working fine but in the backend i'm missing the dropdown selection for "languages"? Only "Columns" and "Quickedit" are visible. How can i enable the "languages" selection in the BE?
I used this typoscript to set it up:
page.config.linkVars = L
page.config.uniqueLinkVars = 1
page.config.sys_language_overlay = content_fallback
page.config.language = nl
page.config.locale_all = nl_NL
page.config.htmlTag_langKey = nl-NL
page.config.sys_language_uid = 0
[browser = msie]
page.config.htmlTag_setParams = xmlns="http://www.w3.org/1999/xhtml" xmlns:v=”urn:schemas-microsoft-com:vml” xml:lang="nl"
[globalVar = GP:L = 1]
page.config.language = en
page.config.locale_all = en_EN
page.config.htmlTag_langKey = en-EN
page.config.sys_language_uid = 1
[globalVar = GP:L = 1] && [browser = msie]
page.config.htmlTag_setParams = xmlns="http://www.w3.org/1999/xhtml" xmlns:v=”urn:schemas-microsoft-com:vml” xml:lang="en"
[globalVar = GP:L = 2]
page.config.language = de
page.config.locale_all = de_DE
page.config.htmlTag_langKey = de-DE
page.config.sys_language_uid = 2
[globalVar = GP:L = 2] && [browser = msie]
page.config.htmlTag_setParams = xmlns="http://www.w3.org/1999/xhtml" xmlns:v=”urn:schemas-microsoft-com:vml” xml:lang="de"
In Order to be able to translate content in the backend into e.g. english you need to
Go to your Root page (ID=0), select the list module and create a
'Website Language' Record 'english'.
Go to the page you want to translate and create a record called
'Alternative Page Language'. Choose 'english' as Language.
You should now see a translation option in the discribed dropdown.
Repeat for as many pages and languages as you need.
Edit: You can see how this is done in this (german) video: http://www.youtube.com/watch?v=62ZuTYRKq5U

Setting sys_language_overlay = hideNonTranslated hides translated content elements on root page (inversed behaviour)

I've setup a multilanguage (german [default], english, japanese) TYPO3 project with Templavoila and want to hide non translated content elements. Therefore I defined sys_language_overlay = hideNonTranslated. Generally this does work well but has an unexpected side effect on the root/homepage. If the overlay mode it set to hideNonTranslated no content will show up on the homepage at all while non translated content is hidden on all subpages as expected.
Below is my typoscript showing the language setup.
config{
sys_language_overlay = hideNonTranslated
sys_language_mode = strict
linkVars = L
uniqueLinkVars = 1
tx_cooluri_enable = 1
redirectOldLinksToNew = 1
}
// ger
[globalVar = GP:L = 0]
config{
sys_language_uid = 0
language = de
locale_all = de_DE.UTF-8
htmlTag_langKey = de-DE.utf8
}
[global]
// en
[globalVar = GP:L = 1]
config{
sys_language_uid = 1
language = en
locale_all = en_US.UTF-8
htmlTag_langKey = en-US.utf8
}
[global]
// jp
[globalVar = GP:L = 2]
config{
sys_language_uid = 2
language = jp
locale_all = jp_JP.utf8
htmlTag_langKey = jp-JP.utf8
}
[global]
How could I track down what causes that issue. What do I have to change in order to get the expected behaviour?
I really can't tell what's wrong with my setup. So any input is highly appreciated.
So I found the "issue".
It was caused by a small difference in the page layout on the homepage in comparison to subpages. The homepage uses additional flexible content elements provided by Templavoila. These have to be configured to appear in all languages by setting the language field inside the fce to [All] instead of Default.