Home > Blockchain >  Change HTML language from en-US in to en-UK in WordPress?
Change HTML language from en-US in to en-UK in WordPress?

Time:12-28

How can i change HTML lang from en-us to en-uk, i have selected en-uk in wordpress dashboard but its displaying en-gb <html lang="en-GB">.

Simply i want to change <html lang="en-US"> to: <html lang="en-UK">

CodePudding user response:

Inside the wp-config.php put the following line:

$locale = 'en-UK';

CodePudding user response:

try to copy and paste this php function in your functions.php file:

function wp_change_lang_attribute( $lang ) {
return 'en-UK';
}
add_filter( 'language_attributes', 'wp_change_lang_attribute' );
  • Related