In HTML structure we have
<html lang="tr">
It is very useful when you need to transform text to upper/lowercase with different languages.
<div style="text-transform: uppercase;" id="asd">iğüşçıâ</div>
I'm working on a single page application, so I can't refresh the page.
But web application is multilingual so I need to change "lang" attribute of html tag without refreshing page.
I tried:
document.documentElement.lang = "en"
It doesn't affect text-transform: uppercase;. If I manually change the html lang attribute in HTML file and reload the page, it works fine.
How can I done this? Is there a way?
Thanks advance.
update: Some Stackoverflow users marked this is about ajax, php things. I'm sure sure this question never asked before. This question NOT about ajax and php.