I want to make a page in English that has a button which can change the language to German. I have read thousands of articles about this topic but I haven't got the answer. I know for sure I don't want to make it with Google Translator API or any API. I want to make it with pure JS. I just want to how do you do it? With a button that has a lot of lines that changes the element's text one by one:
function changeLang () { document.getElementById('someid').innerHTML = "some German text"; ... }
Or make it with const transLang { from = "en" to = "de" ...} ?
Please let me know if you have any idea how to start it.