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!'>
- Then, you have to make some changes in provided javascript. Create new Object with strings translated to third language. Name it
i18n_dict2
, for example. Simply copy everything fromi18n_dict
and just translate needed strings. - And the last you should do is to define event handler to second button(code that will run after click to button). Copy everything inside
$('input#translate_button').click(function (event) {
and paste after it. But don't forget to changeinput#translate_button
toinput#translate_button2
(it's id of your newly created button). - And one more. You have to make your new object avaiable inside second event handler. Just insert
$.i18n.setDictionary(i18n_dict2);
inside$('input#translate_button').click(function (event) {