I am NOT developing any web service application which contain client side and backend server side (like java EE application or Ruby on Rai
Generally JS generating the code for you is not good. But, I did one POC for the same using underscore.js. The framework is having an "_template" function that helps us to replace all the keys in the HTML file. The function accepts the key value pair in JSON format.
Based on the language selected, load the corresponding JSON file and then pass it on to the _template function. This will replace all the keys.