How to translate data for custom components in AEM as a Cloud Service | Community
Skip to main content
Level 4
March 3, 2023
Solved

How to translate data for custom components in AEM as a Cloud Service

  • March 3, 2023
  • 2 replies
  • 1242 views

I have been using AEM as a Cloud Service. In that I have created few custom components. Then, I have implemented the Language copy for my site. But the custom components which I have created, their data on frontend is not being translated. Is there a way through which I can achieve translation for custom components too?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by aanchal-sikka

Hello @nikita24tailor 

 

regarding i18n

If its the i18n translation that you are looking for, then you might want to visit https://experienceleague.adobe.com/docs/experience-manager-65/developing/components/internationalization/i18n-dev.html?lang=en#

https://www.tothenew.com/blog/i18n-implementation-using-sightly/ 

 

Even if i18n dictionary is set up, we need to use the relevant APIs to inform AEM to use them. It can be in:

  • Java source files.
  • JSP scripts.
  • Javascript in client-side libraries or in page source.
  • JCR node property values used in dialogs and component configuration properties.
  • Sightly

 

regarding translation:

If you are looking for translation, then you would need to declare the new component/properties in Translation rules.

How these translation rules are configured might change for different translation vendors. A generic approach is https://experienceleague.adobe.com/docs/experience-manager-learn/sites/translation/translation-rules-editor-technical-video-setup.html?lang=en .

Please check with the team, how translation rules are defined for your project.

2 replies

Manu_Mathew_
Community Advisor
Community Advisor
March 3, 2023
aanchal-sikka
Community Advisor
aanchal-sikkaCommunity AdvisorAccepted solution
Community Advisor
March 4, 2023

Hello @nikita24tailor 

 

regarding i18n

If its the i18n translation that you are looking for, then you might want to visit https://experienceleague.adobe.com/docs/experience-manager-65/developing/components/internationalization/i18n-dev.html?lang=en#

https://www.tothenew.com/blog/i18n-implementation-using-sightly/ 

 

Even if i18n dictionary is set up, we need to use the relevant APIs to inform AEM to use them. It can be in:

  • Java source files.
  • JSP scripts.
  • Javascript in client-side libraries or in page source.
  • JCR node property values used in dialogs and component configuration properties.
  • Sightly

 

regarding translation:

If you are looking for translation, then you would need to declare the new component/properties in Translation rules.

How these translation rules are configured might change for different translation vendors. A generic approach is https://experienceleague.adobe.com/docs/experience-manager-learn/sites/translation/translation-rules-editor-technical-video-setup.html?lang=en .

Please check with the team, how translation rules are defined for your project.

Aanchal Sikka