Martin Bean Martin Bean - 2 years ago 87
PHP Question

Change HTML language from en-US in to en-GB in WordPress?

This may sound like a simple and trivial question, but I'm using the following tag in a WordPress theme header file:

<html <?php language_attributes(); ?>>

Which is outputting:

<html dir="ltr" lang="en-US">

I wish to change the
attribute to "en-GB" as my blog and the language posts are written in are British English (en-GB) but I can't find where this parameter is set in the WordPress admin settings, and there isn't a value for it in the
database table either, which leaves me to believe setting the
value must be some sort of dark art?

Answer Source

Define the language attribute using:

define ('WPLANG', 'en-GB');

You can get more information on it at

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download