我目前正在尝试本地化某些Webforms。都是使用TYPO3 v8的forms_formframework制作的。
前端始终显示翻译后的标签,它会忽略所选的语言。
locallang.xlf
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
<file source-language="en" datatype="plaintext" original="messages" product-name="dm_layout">
<header/>
<body>
<trans-unit id="kontaktformular.element.text-1.properties.placeholder" xml:space="preserve">
<source>Original</source>
</trans-unit>
</body>
</file>
</xliff>
de.locallang.xlf
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
<file source-language="en" target-language="de" datatype="plaintext" original="messages" product-name="dm_layout">
<header/>
<body>
<trans-unit id="kontaktformular.element.text-1.properties.placeholder" xml:space="preserve">
<target>Kontakt DE</target>
</trans-unit>
</body>
</file>
</xliff>
languages.ts(打字稿正确加载)
config.language = de
config.sys_language_uid = 0
config.locale_all = de_DE.utf8
[globalVar = GP:L=1]
config.language = en
config.sys_language_uid = 1
config.locale_all = en_GB.utf8
[global]
英语页面应显示:原始
德语页面应显示:Kontakt DE
但两者都恢复了'Kontakt DE'
我所做的与How do you translate EXT:Form forms in TYPO3 CMS 8.7 LTS?
几乎相同答案 0 :(得分:1)
在您的de.localland.xlf中尝试:
<trans-unit id="kontaktformular.element.text-1.properties.placeholder">
<source> Original </source>
<target>Kontakt DE</target>
</trans-unit>