【发布时间】:2015-09-24 08:47:22
【问题描述】:
在我正在研究的项目中,未使用标准 i18n 国际化。而是在前一段时间创建了一个自定义的。
现在随着在 AEM 6.1 上的迁移,我们希望使用 Sightly,但仍使用我们自己的自定义系统。很明显有i18n support,我想知道是否可以为我们自己的系统创建类似的东西。
我尝试使用模板,但很难在不同的数据标签中使用它们然后调用。 (例如 data-sly-attribute)我在这里犯错了吗?
template.html
<template data-sly-template.foo="${ @ key }">bar</template>
<sly data-sly-call="${ foo }" data-sly-unwrap></sly>
<div data-sly-attribute="${ foo }"></div>
output.html
bar
<div></div>
我尝试使用 java 接口 RuntimeExtension 进行某些工作,但没有成功。
我们的系统基本上是一个带有标签和字符串的 xml 文件。我可以从那里获取数据而不会出现服务问题。
例子:
<en>
<com.example.title jcr:primaryType="nt:unstructured" value="A title"/>
<com.example.desc jcr:primaryType="nt:unstructured" value="Description"/>
</en>
<de>
<com.example.title jcr:primaryType="nt:unstructured" value="Ein Tiel"/>
<com.example.desc jcr:primaryType="nt:unstructured" value="Beschreibung"/>
</de>
如果您对此问题有任何疑问,请随时提出。
【问题讨论】:
标签: java internationalization aem sightly