for my project I went a much easier way. I have several XML files, one for each language, with a unique suffix for each language: menus_en.xml, menus_fr.xml, dialogues_en.xml, dialogues_fr.xml...
Then in the game, I just have a global variable "language", which I set to "en" for english or "fr" for french. Then I just load the xml files with ajax by providing the parameter "menus_2&language. By keeping the text outside of construct, it is easier to edit, maintain or to add new languages.
In fact I also detect the browser's language with the Browser plugin. If it matches one of the supported languages, it will set to that language by default, else it loads english. But you must still give the user the option to change it manually.