Expand my Community achievements bar.

How to Automatically Set the Language Dropdown to 'Japanese' for a Language Copy in AEM

Avatar

Level 2

Hi Team,

My site structure follows the pattern /content/sample/language-master/en, and I am currently creating a Japanese language copy from the English master. While the language copy is successfully created at /content/sample/language-master/ja, the issue arises when I check the Advanced tab in the page properties. The language dropdown still shows "English" instead of "Japanese." Could you guide me on how to ensure the language dropdown automatically updates to "Japanese" during the creation process, without requiring manual selection?

10 Replies

Avatar

Community Advisor

Hi @veerareddyc1015 
I don't think so the jcr:language property will gets rollout. It is excluded OOTB from "CQ MSM Content Update Action"

You have to set language property only on root page of the tree e.g. /content/mysite/jp/jp.

 

https://techrevel.blog/2019/09/26/msm-rollout-excluding-content-updates/ 



Arun Patidar

Avatar

Level 2

Thanks Arun for the quick reply.
I am facing the issue once I create a "Japanese" language copy from English and open the properties of /content/sample/language-master/ja and go to the Advanced tab.

Avatar

Community Advisor

Hi @veerareddyc1015 

What is the value of jcr:language in your master page, e.g., /content/sample/language-master/ja?

 

I believe that when you create a new live copy and the master page already has the language set, those properties will roll out as expected. However, if you later update the property in the master, As expected the changes won’t reflect in the live copy due to the exclusion rule jcr:*



Arun Patidar

Avatar

Level 2

Thanks Arun,
We don’t need to focus on the live copy for now; my issue is with the language copy. Create a Japanese language copy from English, then open the page properties, navigate to the advanced tab, and check the value in the language dropdown. I expect the value to be Japanese, but it still shows English.

 

Thanks in Advance.

Veera

Avatar

Community Advisor

Hi @veerareddyc1015 

While creating language copies, how are you doing translation manual or automated?

I am not sure if this is the default behaviour or not? Can you try in vanilla instances.

 

same question asked here as well

https://stackoverflow.com/questions/42023552/can-the-jcrlanguage-property-be-configured-automaticall... 



Arun Patidar

Avatar

Level 2

Hi Arun/Team,

 

I am currently using AEM as a Cloud Service. I have attached a video demonstrating the following steps:

  1. Updated the language dropdown (set to English) and redirect path (set to /content/wknd/language-masters/en/about-us) on the English page located at /content/wknd/language-masters/en.
  2. Created an "AR" language copy from the English language master using a Multi-Translation Project.
  3. Opened the page properties of /content/wknd/language-masters/ar.html, navigated to the Advanced tab, and observed the following:
    • The redirect path was updated correctly to /content/wknd/language-masters/ar/about-us, which is language-specific.
    • However, the language dropdown still shows "English" instead of "Arabic," which I expected.

Can you confirm if this is the expected behavior, or am I missing some configuration?

Thanks in Advance

Veera

Avatar

Community Advisor

Hi @veerareddyc1015 

I think this is the expected behaviour. I have checked the wknd project but there is no language property set.



Arun Patidar

Avatar

Level 2

thanks Arun for the confirmation,

 

Can you please suggest how to implement the automatic setup of a language copy-specific value?

 

Thanks & Regards

Veera

Avatar

Community Advisor

Hi @veerareddyc1015 

I recommend adding those manuals to the language copy root page(e.g./content/sample/language-master/ja), as it only needs to be set once.

If you need it for i18n, the i18n system can also detect the language based on the URL path.

 

While automation using event listeners is an option, in my opinion, it would be unnecessary and overly done.



Arun Patidar

Avatar

Administrator

@veerareddyc1015 Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!



Kautuk Sahni