我正在使用TYPO3 CMS 6.2.6和一个名为“jobfair”的新奇妙的Extbase扩展 . 我添加了这样的新templateRootPaths:
plugin.tx_jobfair {
view {
templateRootPaths {
100 = EXT:jobfair/Resources/Private/Templates/
101 = fileadmin/templates/ext/jobfair/Resources/Private/Templates/
}
partialRootPaths {
100 = EXT:jobfair/Resources/Private/Partials/
101 = fileadmin/templates/ext/jobfair/Resources/Private/Partials/
}
layoutRootPaths {
100 = EXT:jobfair/Resources/Private/Layouts/
101 = fileadmin/templates/ext/jobfair/Resources/Private/Layouts/
}
}
}
...
因此,我可以编辑特定设计的模板和部分 . ALl其他模板将从/ typo3conf / ext / jobfair / Resources / ...加载
一切正常 . 我还将语言文件夹从扩展名(typo3conf)复制到我的fileadmn文件夹(fileadmin /.../ jobfair / Resources / Private / Language /) .
我编辑“locallang.xlf”和“de.locallang.xlf”,例如:
partial:ContractType.html
<f:if condition="{job.contractType} == 0">
<f:translate key="tx_jobfair_domain_model_job.contract_type.0" />
</f:if>
我将在de.locallang.xlf上更改目标
<trans-unit id="tx_jobfair_domain_model_job.contract_type">
<source>Contract Type</source>
<target>Here's my german translation!!!</target>
</trans-unit>
但它不起作用!?
如何为我的分机翻译或重命名后端(flexform)标签? de.locallang.xlf不是正确的文件吗?
谢谢你的帮助 . 附:我清除了TYPO3中的任何缓存..没有任何反应 .
这是我的文件系统
我对FLUIDTEMPLATE的使用方法与此相同
2 回答
模板和语言处理是TYPO3中的独立组件 . 因此,您覆盖原始文件的模板文件无法“知道”您在其他位置复制了语言文件 . 你有几个选择 .
只是为了记录,使用TypoScript可以轻松地覆盖前端的标签:
(默认语言有“default”als languageKey . )
在后端,您可以使用Page TSConfig覆盖TCA和FlexForm标签:
请注意Powermail示例中的反斜杠 . 相应字段称为
settings.flexform.main.optin
. 由于点通常是"path separators",因此必须将它们转义才能使其正常工作 .除了这种配置方式,还有一种完全不同的方法 . 您可以覆盖整个翻译文件:
有关此主题的更多信息,请参见here .
完善 . 洛伦兹,非常感谢您的详细解释 . 现在我明白了,'我会看到更大的图景'......
我只需要在该项目中进行后端翻译,例如:
但我也测试它的前端视图:
完美的作品!非常感谢你!