I'm looking into solutions for polymer 1.0 and yet I find it hard to understand how this works. Found this https://github.com/Polymer/i18next-element which is unfortunately not even ready yet. Meanwhile I cannot figure out how to use i18next.I'm trying to combine all the info i can find, followed https://github.com/tabacha/javascript-i18n-example/blob/master/i18next/examle.html with any combinations from http://i18next.com/pages/sample.html and made sure to take a look at http://japhr.blogspot.gr/2014/02/getting-started-with-i18next-and-polymer.html . The thing is, I seem to get wrong everything, even the very first initialization that imports the JSON filed needed. For starters the i18next is based on javascript functions that cannot work inside a polymer ready function due to syntax differences.
So my question is, am i getting something wrong or is this really that difficult to do with polymer? Anyone got a working example to share?
Trying to explain what I mean with an example, let's say that my polymer app has a list of all button labels in it, where the labels are stored in a language of selection JSON file. so in the properties i got an empty buttons_list type: Array property. then in ready: function() I follow the steps from the documentation (after having imported the i18next.js file of course)
var option = { resGetPath: '/localizeddata/english.json' };
i18n.init(option);
var bvalue1 = i18n.t("buttons.value1");
var bvalue2 = i18n.t("buttons.value2");
this.buttons_list = {value1: bvalue1,value2: bvalue2}
buttons_list seems to be recognizing buttonvalue1 and 2 as undefined values.
PS: I've noticed many people use Dart, i haven't used it before, that is why so far i've only tried the solutions mentioned above.