Expand my Community achievements bar.

SOLVED

AEM Cloud - How to use i18n values on components for multi language sites?

Avatar

Level 4

 

Re this: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/where-is-the-i18n-translat... assuming Translator (<sever>/libs/cq/i18n/translator.html) is deprecated/not-to-be-used.

 

We have a component where we need to use i18n strings for name on button

 

1. We added language folder and json under "ui.apps/src/main/content/jcr_root/apps/my-project/i18n"

Screen Shot 2022-12-08 at 12.52.14 PM.png

2. After deploy, can see the values at "<server>/libs/cq/i18n/dict.nl.json"

Screen Shot 2022-12-08 at 12.54.00 PM.png

How can we use/refer these on the components' html? 

 

 <div class="btn-row">
    <button
      type="button"
      class="continue-btn"
      aria-label="${'Continue Without Accepting' @ i18n}">${'Continue Without Accepting' @ i18n}
    </button>
  </div>

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @surenk 

 

For AaaCS, the i18n UI (<sever>/libs/cq/i18n/translator.html)  is deprecated. Currently, i18n translations need to be deployed with codebase via ui.apps module.

Sample code:

<span class="filter-toggle-button--label">${'Filter' @ i18n}</span>

 


Aanchal Sikka

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hello @surenk 

 

For AaaCS, the i18n UI (<sever>/libs/cq/i18n/translator.html)  is deprecated. Currently, i18n translations need to be deployed with codebase via ui.apps module.

Sample code:

<span class="filter-toggle-button--label">${'Filter' @ i18n}</span>

 


Aanchal Sikka