Expand my Community achievements bar.

SOLVED

How to use the i18n

Avatar

Level 1

Hi,

                     

I am using the below code for translate the English to other language through i18n

1 > ${"{0}" @i18n, format=[properties.questionAnswer],context='html'}

2 > ${properties.questionAnswer @ i18n, context='html'}

But this is not working for me.

 

When i am using the below code it is working fine for me
 ${"Hello World" @ i18n, context='html'}

So is there any way to use the i18n for RTE (Rich Text ).

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@Tekno,

You need to add the correct dictionary keys in the AEM console here: http://{SERVER}:{PORT}/libs/cq/i18n/translator.html

View solution in original post

10 Replies

Avatar

Community Advisor

Try with

${'{0}' @ format=[properties.questionAnswer], i18n, locale='de'}

 

Please check below for richtext translation

https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/i18n-translator.html

You have to create key with HTML.



Arun Patidar

Avatar

Level 1
@Deleted Account, ${'{0}' @ format=[properties.questionAnswer], i18n, locale='de'} as you can see in your code you have not mentioned @CONTEXT='html' it is not translating into the html on page And this is not working for RTE(Rich Text)

Avatar

Community Advisor
for rich text you have to add key as html . Please check the links which I have shared.


Arun Patidar

Avatar

Level 1

@Deleted Account, Can you please given me full example of i18n in rich Text, so that i can implement because i have tried everything for rich text but the convertion from english to other language is not worked for me.

Avatar

Level 5
Hi @Deleted Account, how to directly add i18n key in my htl code?

Avatar

Correct answer by
Community Advisor

@Tekno,

You need to add the correct dictionary keys in the AEM console here: http://{SERVER}:{PORT}/libs/cq/i18n/translator.html

Avatar

Level 1
Hi Briankasingli, I have added that is why i am getting the translation while i am using the ${properties.name @i18n}. But this is not working for RTE(Rich Text) below code which i have used for RTE 1 > ${"{0}" @i18n, format=[properties.questionAnswer],context='html'} 2 > ${properties.questionAnswer @ i18n, context='html'}

Avatar

Community Advisor

@Tekno 

I recommend you to first get the out of the box Internationalization (i18n) feature in your FRESH local AEM working. Then after you can try to integrate the feature into your project.

Steps I recommend:

Regards,

Brian.