Accessing i18n strings through javascript
Hi,
As per below link, I'm trying to access i18n string using javascript. I have included the clientlibs granite.util in my page.
https://docs.adobe.com/docs/en/aem/6-1/develop/components/i18n/i18n-dev.html
I have key/string as imported by {0} on {1}. I'm trying to access the i18n strings using below line of code
Granite.I18n.setLocale("de");Granite.I18n.get("imported by {0} on {1}", [userName, date], "user name, date");
All I get was username and date substituted in the key as imported by Peter on 26th Aug. It doesn't give localized string. Whereas if I use below code
Granite.I18n.get("Warning"); It gives localized string "Warnung:.
Kindly let me know if I miss something.
Thanks,
Ruben