Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to access project specific i18n folder in Publisher/Dispatcher instance?

kishorekumar14
Level 10
Level 10

Hi,

 

Suppose if i have project specific i18n folder like below

 

/apps/<<project-name>>/i18n/fr.json

 

I need an access to this folder in Publisher instance so that i can give all the 1i8n keys and values as a json. This json url has to be given to some other channel so that they can make use of keys and values. Please let me know how to do it.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution
BrianKasingli
Correct answer by
Community Advisor
Community Advisor

@kishorekumar14,

You can achieve this by exporting the AEM dictionary values from a servlet. You can find this useful tutorial here, https://sourcedcode.com/blog/aem/how-to-get-aem-i18n-dictionary-in-json-format, where it will provide you a step by step guide on How to Get AEM i18n Dictionary in the JSON Format.

 

View solution in original post

4 Replies
BrianKasingli
Correct answer by
Community Advisor
Community Advisor

@kishorekumar14,

You can achieve this by exporting the AEM dictionary values from a servlet. You can find this useful tutorial here, https://sourcedcode.com/blog/aem/how-to-get-aem-i18n-dictionary-in-json-format, where it will provide you a step by step guide on How to Get AEM i18n Dictionary in the JSON Format.

 

kishorekumar14
Level 10
Level 10
But it is mentioned as in published i8n folder should be in etc folder. Is there any way we can avoid this
BrianKasingli
Community Advisor
Community Advisor
To get JSON from the i18n dictionary, this may be the cleanest way.
BrianKasingli
Community Advisor
Community Advisor
Another way is by exposing the dictionary key within the HTML markup. Use your Sling Model to expose dictionary key/values, so it can be consumed by your JavaScript via data-attributes