TYPO3:如何在本地语言中为 flux:object 中的 flux:field 设置正确的 ID?
TYPO3: How do I set the correct id in locallang for a flux:field inside a flux:object?
我正在创建一个灵活的内容元素。
在我的模板配置通量表单中,我在一个对象的一个部分中有一个字段。在我的 locallang.xlf 中,我可以标记我的对象和部分,但我无法成功标记我的字段。
我的模板配置如下:
<f:section name="Configuration">
<flux:form id="element">
<flux:form.section name="settings.mysection">
<flux:form.object name="myobject">
<flux:field.input name="myfield" />
</flux:form.object>
</flux:form.section>
</flux:form>
</f:section>
我的 locallang.xlf 的相关部分看起来像:
<trans-unit id="flux.element.sections.settings.mysection">
<source>This works</source>
</trans-unit>
<trans-unit id="flux.element.objects.myobject">
<source>This also works</source>
</trans-unit>
<trans-unit id="flux.element.fields.myfield">
<source>This doesn't work</source>
</trans-unit>
标签的 id 属性应该是什么 'myfield'?
在您的 AdditionalConfiguration.php
中,添加以下内容:
$TYPO3_CONF_VARS['BE']['lang']['debug'] = true;
现在您将在后端看到完整的语言标签路径:
flux.element.objects.myobject.myfield
这似乎已针对 TYPO3 8.7 https://forge.typo3.org/issues/71095 更改为
$TYPO3_CONF_VARS['BE']['languageDebug'] = true;
我正在创建一个灵活的内容元素。
在我的模板配置通量表单中,我在一个对象的一个部分中有一个字段。在我的 locallang.xlf 中,我可以标记我的对象和部分,但我无法成功标记我的字段。
我的模板配置如下:
<f:section name="Configuration">
<flux:form id="element">
<flux:form.section name="settings.mysection">
<flux:form.object name="myobject">
<flux:field.input name="myfield" />
</flux:form.object>
</flux:form.section>
</flux:form>
</f:section>
我的 locallang.xlf 的相关部分看起来像:
<trans-unit id="flux.element.sections.settings.mysection">
<source>This works</source>
</trans-unit>
<trans-unit id="flux.element.objects.myobject">
<source>This also works</source>
</trans-unit>
<trans-unit id="flux.element.fields.myfield">
<source>This doesn't work</source>
</trans-unit>
标签的 id 属性应该是什么 'myfield'?
在您的 AdditionalConfiguration.php
中,添加以下内容:
$TYPO3_CONF_VARS['BE']['lang']['debug'] = true;
现在您将在后端看到完整的语言标签路径:
flux.element.objects.myobject.myfield
这似乎已针对 TYPO3 8.7 https://forge.typo3.org/issues/71095 更改为
$TYPO3_CONF_VARS['BE']['languageDebug'] = true;