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

daitienshi
daitienshi
Offline
  • 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...

    Type

    Discussions

    Views

    5.2K

    Likes

    0

    Replies

    4
  • 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...

    Type

    Discussions

    Views

    5.2K

    Likes

    0

    Replies

    6
  • 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

    Type

    Discussions

    Views

    7.5K

    Likes

    0

    Replies

    8
  • 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.

    Type

    Discussions

    Views

    7.5K

    Likes

    0

    Replies

    0
  • 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.

    Type

    Discussions

    Views

    7.5K

    Likes

    0

    Replies

    11
  • 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...

    Type

    Discussions

    Views

    7.5K

    Likes

    0

    Replies

    0
  • 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 ...

    Type

    Discussions

    Views

    10.2K

    Like

    1

    Replies

    18
Top badges earned by daitienshi
Customize the badges you want to showcase on your profile