Bug #74380
closedTypoScript interpret XLF wrong for Default-Language (german) and english
0%
Description
System:
- TYPO3 7.6.4
- default language German
- misleading language in language-Switcher
Bug
The engish (not default/main language of the website) translations are taken from the en.locallang.xlf-file within the <source>-Tags
The german translation (main-language in the website) are taken from de.locallang.xlf within the tags <target>.
Expected
The engish translations are taken from the en.locallan.xlf-file within the <target>-Tags
The german translation are taken from locallang.xlf within the <source>.
The german translation should be ignored in de.locallang.xlf.
or Expected
The engish translations are taken from the en.locallan.xlf-file within the <target>-tag
The german translation are taken from de.locallang.xlf within the <target>-tag.
The translation-file locallang.xlf should be evrytime ignored, if a localised XLF-file exists.
Code-Definitions
langugae typoscript-configuration #defaultblock for language-aspects config { # = = Default sys_language_uid = 0 locale_all = de_DE language = de htmlTag_langKey = de } lib.language.meta = TEXT lib.language.meta.value = <meta name="content-language" content="deutsch,de" /> # marker of the active language (key in the lib.languages ) lib.language.active < lib.languages.german [globalString = GP:L={$skeleton.config.language.de}] config { sys_language_uid = {$skeleton.config.language.de} locale_all = de_DE language = de htmlTag_langKey = de } lib.language.meta.value = <meta name="content-language" content="de" /> lib.language.active < lib.languages.german [global] [globalString = GP:L={$skeleton.config.language.en}] config { sys_language_uid = {$skeleton.config.language.en} sys_language_mode = fallback; {$skeleton.config.language.en},0 locale_all = en_GB language = en htmlTag_langKey = en } lib.language.meta = TEXT lib.language.meta.value = <meta name="content-language" content="en" /> lib.language.active < lib.languages.english [global] ...
Language-file Structure: locallang.xlf
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <xliff version="1.0"> <file source-language="de" target-language="de" datatype="plaintext" original="messages" date="2016-01-25T08:12:53Z" product-name="skeleton"> <header/> <body> <trans-unit id="tx_skeleton.menu.title"> <target>[DE]Menü</target> <source>[sourDE]Menü</source> </trans-unit> <trans-unit id="menu.language.de"> <target>[DE]Deutsch</target> <source>[sourDE]Deutsch</source> </trans-unit> …
language-file structure: de.locallang.xlf
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <xliff version="1.0"> <file source-language="de" target-language="de" datatype="plaintext" original="messages" date="2016-01-25T08:12:53Z" product-name="skeleton"> <header/> <body> <trans-unit id="tx_skeleton.menu.title"> <target>[DEDE]Menü</target> <source>Menü</source> </trans-unit> <trans-unit id="menu.language.de"> <target>[DEDE]Deutsch</target> <source>Deutsch</source> </trans-unit> ...
Language-file Structure: en.locallang.xlf
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <xliff version="1.0"> <file source-language="de" target-language="en" datatype="plaintext" original="messages" date="2016-01-25T08:12:53Z" product-name="skeleton"> <header/> <body> <trans-unit id="tx_skeleton.menu.title"> <target>[EN]Menü</target> <source>[sourEN]Menü</source> </trans-unit> <trans-unit id="menu.language.de"> <target>[EN]Deutsch</target> <source>[sourEN]Deutsch</source> </trans-unit> ...
TypoScript the language-switcher
## Localization menu: lib.menu.language.dropDown = HMENU lib.menu.language.dropDown { special = language special.value = 0,1,2,3,4,5,6,7 1 = GMENU 1 { NO { XY = [5.w]+4, [5.h]+4 backColor = silver 5 = IMAGE 5.file = EXT:skeleton/Resources/Public/Images/Flags/de.gif || EXT:skeleton/Resources/Public/Images/Flags/gb.gif || EXT:skeleton/Resources/Public/Images/Flags/fr.gif || EXT:skeleton/Resources/Public/Images/Flags/ru.gif|| EXT:skeleton/Resources/Public/Images/Flags/es.gif|| EXT:skeleton/Resources/Public/Images/Flags/it.gif|| EXT:skeleton/Resources/Public/Images/Flags/pl.gif|| EXT:skeleton/Resources/Public/Images/Flags/ro.gif 5.offset = 2,2 allWrap = <li>| {LLL:EXT:skeleton/Resources/Private/Language/locallang.xlf:menu.language.de}</li> || <li>| {LLL:EXT:skeleton/Resources/Private/Language/locallang.xlf:menu.language.en}</li> || <li>| {LLL:EXT:skeleton/Resources/Private/Language/locallang.xlf:menu.language.fr}</li> || <li>| {LLL:EXT:skeleton/Resources/Private/Language/locallang.xlf:menu.language.ru}</li> || <li>| {LLL:EXT:skeleton/Resources/Private/Language/locallang.xlf:menu.language.es}</li> || <li>| {LLL:EXT:skeleton/Resources/Private/Language/locallang.xlf:menu.language.it}</li> || <li>| {LLL:EXT:skeleton/Resources/Private/Language/locallang.xlf:menu.language.pl}</li> || <li>| {LLL:EXT:skeleton/Resources/Private/Language/locallang.xlf:menu.language.ro}</li> allWrap.insertData = 1 } ACT < .NO ACT = 1 ACT.noLink = 1 ACT.backColor = black } } lib.menu.language.main = COA lib.menu.language.main { 10 < lib.menu.language.dropDown wrap = <ul class="language">|</ul> }
Files