Title: Changing WP language settings also changes &#8220;html lang&#8221; attribute
Last modified: August 8, 2019

---

# Changing WP language settings also changes “html lang” attribute

 *  [BayLev](https://wordpress.org/support/users/baylev/)
 * (@baylev)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/changing-wp-language-settings-also-changes-html-lang-attribute/)
 * Hello all,
 * There may be a simple answer to this, but does changing the “Website” language
   in the WordPress dashboard is supposed to affect the the “href lang” attribute
   of the site as well?
 * In my case I would require the WP dashboard to be in English while the frontend(
   the actual website) is in German. Sounds easy enough, but when checking the source
   code after switching to English, I get this:
 * **Before:**
    _<!DOCTYPE HTML> <html lang=”de-DE”
 * **After:**
    _<!DOCTYPE HTML> <html lang=”en-US”
 * Therefore, it looks like when changing the language in WordPress (the option 
   being called “Website” rather than “Dashboard” language) is affecting the html
   lang tags as well.
 * Not wanting to mess up with any of the SEO, I wonder if switching languages within
   WordPress also affects the frontend in any way. Surly it must be possible to 
   have the dashboard in one language and the actual website in another language.
 * Thanks all for your help!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [ikaring](https://wordpress.org/support/users/ikaring/)
 * (@ikaring)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/changing-wp-language-settings-also-changes-html-lang-attribute/#post-11811050)
 * Hi. Easy fix is to add these lines in wp-config.php according to ref page in 
   japanese ([https://firegoby.jp/archives/2404](https://firegoby.jp/archives/2404)):
 *     ```
       if (preg_match('/^\/wp\-admin/', $_SERVER['REQUEST_URI'])) {
           define('WPLANG', 'en-US');
       } else {
           define('WPLANG', 'de-DE');
       }
       ```
   
 * However, this fix left adminbar in de-DE, he saids.
 * To fix adminbar to be en-US while frontend html in de-DE, activate switch-lacale.
   php plugin hosted in gist and set `define('SITE_LANG', 'de-DE');` in wp-config.
   php as frontend html lang.
 * It is an old post, so I dont know if it works now.
    Hope this helps.
 *  [Sam](https://wordpress.org/support/users/ullmaj3/)
 * (@ullmaj3)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/changing-wp-language-settings-also-changes-html-lang-attribute/#post-11811503)
 * Thank you ikaring, it’s working with me

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Changing WP language settings also changes “html lang” attribute’ is 
closed to new replies.

## Tags

 * [html lang](https://wordpress.org/support/topic-tag/html-lang/)
 * [language](https://wordpress.org/support/topic-tag/language/)
 * [language settings](https://wordpress.org/support/topic-tag/language-settings/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [Sam](https://wordpress.org/support/users/ullmaj3/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/changing-wp-language-settings-also-changes-html-lang-attribute/#post-11811503)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
