Expand my Community achievements bar.

SOLVED

i18n in AEM as a cloud

Avatar

Level 2

I cannot modify i18n in /apps as i am using for translation, Where can i place i18n apart from apps and please explain me the steps

I tried placing i18n in /content/cq:i18n/en/test/submit where en and test is of sling:folder, submit is of type sling:messageEntry and it has sling:message property as submit, its not recognizing the i18n , please help me out

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Can you try to restart i18n bundle or restart AEM/Felix console?

https://sourcedcode.com/blog/aem/aem-i18n-not-showing-translations 

Arun Patidar

AEM LinksLinkedIn

View solution in original post

12 Replies

Avatar

Community Advisor

Hi @Shwetha1994 

I think it should work, I can see that 'Apache Sling I18N Resource Bundle Provider' config has /content/cq:i18n in include path

arunpatidar_0-1749541457837.png

 

Please check https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/can-we-move-i18n-file-from... 

 

Arun Patidar

AEM LinksLinkedIn

Avatar

Level 2

I tried the same link /content/cq:i18n/test/en.json

Shwetha1994_0-1749541977144.png

 

en.json has
{
"hello" : "Test Hello"
}

Shwetha1994_1-1749542107945.png



<div>Test : ${'hello' @ i18n}</div>

Avatar

Level 2

It always defaults to hello on the page

Avatar

Community Advisor

Hi @Shwetha1994 

Can you share the content of json?

Arun Patidar

AEM LinksLinkedIn

Avatar

Level 2

en.json

{
  "hello" : "Test Hello"
}

Avatar

Level 2

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0"
jcr:language="en"
jcr:mixinTypes="[mix:language]"
jcr:primaryType="nt:file">
<jcr:content
jcr:lastModifiedBy="Administrator"
jcr:primaryType="nt:resource"/>
</jcr:root>

Avatar

Community Advisor

Hi @Shwetha1994 

do you have other language translation where you can check?
Example, can you create a fr.json with 

{
  "hello" : "Bonjour"
}

And try accessing fr page or change language to French from User Preference and test
Arun Patidar

AEM LinksLinkedIn

Avatar

Level 2

tried same didnt worked 
en page

Shwetha1994_0-1749543681571.png


fr page

Shwetha1994_1-1749543697114.png

 

Avatar

Correct answer by
Community Advisor

Can you try to restart i18n bundle or restart AEM/Felix console?

https://sourcedcode.com/blog/aem/aem-i18n-not-showing-translations 

Arun Patidar

AEM LinksLinkedIn

Avatar

Level 2

After restarting instance it worked. Thanks

Avatar

Level 2

I am updating i18n instead of cq:i18n after restart of instance its not picking updated value, do we need to keep cq:i18n only?

Avatar

Community Advisor

Hi @Shwetha1994 

You need to include the new paths at Apache Sling I18N Resource Bundle Provider osgi config to pick i18n transitions.

/content/i18n is not included ootb

Arun Patidar

AEM LinksLinkedIn