How To Change Html Lang En-Us To En Wordpress

WordPress
How to change html lang en-US to en WordPress – here is the syntax of the HTML lang attribute:

html lang = "language_code"

In the above syntax, language_code is used to specify the ISO language code.

For example, if the content language is English, then the language code should be β€œen”:

html lang = "en"

Similarly, if the content is in the French language, the language code should be:

html lang = "fr"

Methods to change your WordPress html language.
Add a filter inside function.php

add_filter( ‘language_attributes’, ‘setLangAttr’ );

function setLangAttr() {
return ‘lang=”en”‘;
}

Or
Add define inside wp-config.php

define (‘WPLANG’, ‘en’);

Or
Download and install this plugin HTML Global lang Attribute.

3 comments

Leave a Reply

Your email address will not be published. Required fields are marked *