How to use i18n dictionary from backend to expose translation via servlet in headless architecture?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
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;
@bkkothari2255 Please check out this article from@Albin_Issac , it provides servlet example on how to export in json.
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;