The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End [php] html "lang" attribute if statement Reply To: [php] html "lang" attribute if statement


I found another solution using JavaScript:

var lang = document.documentElement.lang
if (lang == ‘en-US’) {
document.getElementById(“footertext3”).innerHTML = “Here you can find us! We are expecting you!”;

Something like this! Will replace text inside specified div. This is for using inside WP Page, if you try to modify header.php you can use this:

—do something—

—do something else–