Localization TYPO3和locallang.xml文本显示为";数组";而不是流体模板中的文本
我在使用Localization TYPO3和locallang.xml文本显示为";数组";而不是流体模板中的文本,localization,typo3,Localization,Typo3,我在使用locallang.xml 我有这个: <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <T3locallang> <meta type="array"> <type>module</type> <description>Language labels for BE plugin</description&
locallang.xml
我有这个:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3locallang>
<meta type="array">
<type>module</type>
<description>Language labels for BE plugin</description>
</meta>
<data type="array">
<languageKey index="default" type="array">
<label index="mlang_testtext">This is a test text to be translated</label>
</languageKey>
<languageKey index="es" type="array">
<label index="mlang_testtext">Esto es un texto de prueba para ser traducido</label>
</languageKey>
</data>
</T3locallang>
我得到的只是文本数组
另外,如果我在部分模板中同时尝试这两种方法,那么这两种方法都不起作用
编辑:有些地方我不能使用
,例如在按钮标签中,所以我也需要其他表单
我遗漏了什么?检查
/typo3/sysext/fluid/Classes/ViewHelpers/translateviewheelper.php
以了解正确的内联用法示例,例如,将标签设置为输入字段的默认值如下所示:
<f:form.textfield name="myTextBox" value="{f:translate(key: 'mlang_testtext')}" />
也许我在配置中遗漏了一些东西,因为您提供的示例只输出空标签:(哎哟,我忘了删除缓存。它似乎可以工作,非常感谢!
{LLL:mlang_testtext}
<f:form.textfield name="myTextBox" value="{f:translate(key: 'mlang_testtext')}" />