【问题标题】:TYPO3 xliff localisation in extension ist not working as expected扩展中的 TYPO3 xliff 本地化未按预期工作
【发布时间】:2019-02-15 11:52:41
【问题描述】:

我目前正在尝试本地化一些 Web 表单。使用 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(Typoscript 加载正确)

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]

英文页面应显示:Original

德语页面应显示:Kontakt DE

但两者都在“Kontakt DE”中恢复

我做的和How do you translate EXT:Form forms in TYPO3 CMS 8.7 LTS?差不多

【问题讨论】:

    标签: localization typo3 typo3-8.x typo3-extensions xliff


    【解决方案1】:

    在您的 de.localland.xlf 中尝试:

    <trans-unit id="kontaktformular.element.text-1.properties.placeholder">
        <source> Original </source>
        <target>Kontakt DE</target>
    </trans-unit>
    

    【讨论】:

    • 不知什么原因,结果还是一样。
    • 恕我直言,TYPO3 本身的翻译不需要源,但它仍然是人工翻译的一项便利功能,它将源与所需的目标一起可用,因此他们实际上知道应该有什么已翻译,同时更正翻译。
    猜你喜欢
    • 2013-04-20
    • 2021-08-31
    • 1970-01-01
    • 1970-01-01
    • 2013-02-10
    • 2018-07-07
    • 1970-01-01
    • 2015-01-01
    • 1970-01-01
    相关资源
    最近更新 更多