Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

I18n In headless

Avatar

Level 2

How to use i18n dictionary from backend to expose translation via servlet in headless architecture?

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

it depends on the architecture that you will follow for AEM headless. Now a days sling model exporter are being preferred in headless architecture on which you can directly inject any component or service via annotation and in this case you can import it as

@inject
@filter("(component.name=org.apache.sling.i18n.impl.JcrResourceBundleProvider)")
private ResourceBundleProvider i18nProvider;

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/i18n-access-from-model-ada...

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

it depends on the architecture that you will follow for AEM headless. Now a days sling model exporter are being preferred in headless architecture on which you can directly inject any component or service via annotation and in this case you can import it as

@inject
@filter("(component.name=org.apache.sling.i18n.impl.JcrResourceBundleProvider)")
private ResourceBundleProvider i18nProvider;

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/i18n-access-from-model-ada...