Hi guys, i'm having some trouble with getting i18n working like i need it to.
My keystone.js:
...
// Configure i18n
i18n.configure({
locales:['en', 'pt', 'de', 'fr'],
directory: __dirname + '/locales',
objectNotation: true,
defaultLocale: 'pt'
});
...
It works in presenting different translations for Portuguese and English (haven't done the other two). Now i want a way for the user to be able to change the language. the problem is i can't seem to get setLocale('XX') to work from the DOM.
Also, it would be great to store that option in a cookie and have that info when user comes back. i18n has that option to set a cookie, but then how would i set it ? in the routes index.js, after i18n.init ?
Thanks,
Tiago