Hello folks. Hope you are doing great.
I'm having a weird problem with I18n object I created to get the translated strings before rendering my htl template. For example, I'm doing something like this:
var i18n = new Packages.com.day.cq.i18n.I18n(request);
var translated = i18n.get('Some string in my dictionary')
I have configured the language dictionaries properly and created a Spanish copy of the page I'm working on, but I always get the English text on the `translated` variable
I know that the translations are working because if in the HTL I write something like this
${'Some string in my dictionary' @ i18n}
then I can see the Spanish version of the text in the html, so the dictionary is well configured.
Do I need to do anything else to get the translated string in the backend??
Thanks