I have the following html:
<div >${'foo' @ i18n}</div>
In my i18n file, I have the following:
<foo
jcr:mixinTypes="[sling:Message]"
jcr:primaryType="sling:MessageEntry"
sling:key="foo"
sling:message="This is dummy text"/>
This is dummy textdisplayed on the page. Okay bye. The problem is that it foois a variable that comes from another template, and I read the following:
${fooValue} //this returns foo
Now, to read the message from i18n, I tried the following:
< div>${'${fooValue}' @ i18n} </div>
but is displayed on this page ${fooValue}. How to read a message from i18nif I have variable key?
source
share