Hi Ankur,I've noticed that there is an error in the browser console related to the granite.js:Uncaught TypeError: Cannot read property 'externalize' of undefined(...) getToken @ granite.js:176The granite.js it's referring to is the /etc/clientlibs/granite/jquery/granite.js. However, that doesn't...
Hi Ankur,I've added the keys in the translator.html.In my JS, I use Granite.I18n.get("TEST-001"); using just I18n gives me an error of I18n not being defined?I've restarted both the org.apache.sling.i18n and com.day.cq.cq-i18n bundles.Refreshing the page with that code on their still only returns ba...
Hi Ankur,The dictionaries do have the keys TEST-001, TEST-002, TEST-003 during runtime, as I can retrieve those values via JSP. I can even modify the values and see those changes come in via JSP after a page refresh
Hi Joseph, How would I request the dictionary via AJAX? I can call Granite.I18n.getDictionary() and get an object back but I have no clue what this object is (have tried a bunch of the functions it has defined) but still can't get anything out of it.
Hi Anton, Yes, I'm able to successfully use i18n using JSP, but we're looking to dynamically retrieve the string via javascript rather than preloading the string on page render.
Hi Leandro,The relationship between String and EN is based on the translator library found in /libs/cq/i18n/translator.html.The String value is normally used as the lookup key in JSP or Sling and the EN is the actual translated value being returned if the locale is EN.Regardless, if I pass the "This...
Apologies for the duplicate post. Seems like something in the original is breaking the page, so I'll try this again:I'm trying to dynamically retrieve a translated message using Javascript from my created dictionary in AEM's translator (/libs/cq/i18n/translator.html).We've got dictionary values set ...