I am checking this example.
Actually, it changes the text when user clicks the button (in other language ).
But what if user has 3 different languages? (some type of menu option) and on change the option it changes the text.
I have name(in english) but I want to change it to spanish and german also on click. How can I do it?
In example there is a toggle for languages when user clicks the button. If he wants to switch between three or four language - how do implement such a feature? Thanks
Yes, you can do it. There is jsFiddle.
Firstly, create new button with different id in your HTML.
<input type='button' id='translate_button2' value='Internationalize to Russian!'>
i18n_dict2
, for example. Simply copy everything from i18n_dict
and just translate needed strings. $('input#translate_button').click(function (event) {
and paste after it. But don't forget to change input#translate_button
to input#translate_button2
(it's id of your newly created button). $.i18n.setDictionary(i18n_dict2);
inside $('input#translate_button').click(function (event) {