internationalization singe page site

I want to provide different translations on a single page website. Is it a good idea to translate every text entry using this approach (pseudo code):


<p id="my_text"></p>

js (jQuery)

function init(){
    $('#my_text')[0].innerHTML(isEnglish ? "Hello" : "Hallo");

If this solution has any disadvantages or will lead to issues, please let me know which (simple) solution is the better option.

Thanks in advance.


In my opinion, this is going to be tedious for a long passage. I would suggest you use a bing translation API


 ? How do I output this PHP Code in a Proper HTML Table Format?
 ? background css image does not show up in Internet Explorer 11
 ? Mailchimp integrated with PHP but its not showing Already existing message instead its overwriting
 ? Css fluid layout with two columns
 ? Unable to use img with background-image: url()
 ? Outputting stringified JSON data into individual div's
 ? How to print the selected value using checkbox and print them without getting undefined value?
 ? Display ng-message on invalid email without using ng-pattern in angular material
 ? hide column/td of the table by using jquery
 ? jQuery replace attribute within tag in known class id