skip to Main Content

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">

2

Answers


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

    $locale = 'en-UK';
    
    Login or Signup to reply.
  2. 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' );
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search