我尝试翻译蒙版内容元素(TYPO3 10)中的一些标签。我首先创建了mask元素,然后mask创建了一个目录“ typo3conf / ext / mask_project”。我创建了文件“ typo3conf / ext / mask_project / Resources / Private / Language / locallang.xlf”,并在其中放置标签“ read_more”。
在我的FLUID模板中(“ typo3conf / ext / mask_project / Resources / Private / Mask / Frontend / Templates / Staff.html”),我尝试过:
<f:translate key="EXT:mask_project/Resources/Private/Language/locallang.xlf:read_more" />
<f:translate key="LLL:EXT:mask_project/Resources/Private/Language/locallang.xlf:read_more" />
很遗憾,没有打印任何内容。有人有主意吗?
答案 0 :(得分:1)
用于访问完整路径的LLL:EXT:...:...
语法正确(https://docs.typo3.org/other/typo3/view-helper-reference/10.4/en-us/typo3/fluid/latest/Translate.html)。对于默认文件位置,通常不必添加整个路径(这取决于FLUIDTEMPLATE配置)。您还可以使用ViewHelpers extensionName=
参数。
一些提示,如果您仍然没有输出: