Hi Team,
I wanted to insert values in i18n label, which I am using in the HTML code:
The label should be :
String <<DATE>> String <<PRICE>> EUR
here, date and Price are something, I wanted to use dynamically and wanted to populate in the i18n label. I had gone through the documentation but didn't find it helpful as if how I can make use of it.
In my HTML files, I use i18n keys as -
<p>${ 'organisation.componentgroup.component.element.description' @ i18n }</p>
If there is any syntax, where I can pass the values - please suggest it!
Solved! Go to Solution.
Views
Replies
Total Likes
Hi ,
How does the site path looks like?
Can you check if you are getting this labels in
http://localhost:4502/libs/cq/i18n/dict.en.json
http://localhost:4502/libs/cq/i18n/dict.nl.json
Please check format
${'Asset {0} out of {1}' @ format=[properties.current, properties.total], i18n, locale='de'}
Hi @arunpatidar Thanks for the reply. This works fine with your example string.
I have the same label to be used in different languages with different placement of variables based on language.
I have kept labels in nl.xml/en.xml and fr.xml and I was normally accessing the keys in HTML as -
${ 'organisation.componentgroup.component.element.description' @ i18n }
E.g., For accessing the key using variables available in HTML.
for EN and NL -
Asset {0} out of {1} EUR
for FR -
Asset {0} out of EUR {1}
Is there any other syntax, which will take the i18n key instead of passing the string directly?
Hi ,
How does the site path looks like?
Can you check if you are getting this labels in
http://localhost:4502/libs/cq/i18n/dict.en.json
http://localhost:4502/libs/cq/i18n/dict.nl.json
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies