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

Deadly 提交于 2019-12-06 12:21:20

Define the language attribute using:

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

You can get more information on it at http://codex.wordpress.org/Installing_WordPress_in_Your_Language

As for recent version of WordPress 4+ this option

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

is deprecated, to update the language you need to follow either one of the following methods:

Method 1

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

$locale='en_GB';

Method 2 (recommended)

In database, XY_options table to and set an option of WPLAN to en_GB (where XY is the table prefix for your wordpress installation)

exemple queries:

insert

INSERT INTO `XY_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES (NULL, 'WPLANG', 'en_GB', 'yes');

update

UPDATE `XY_options` SET `option_value` = 'en_GB' WHERE `option_name` = 'WPLANG';

I am using Wordpress 5.1.1 , at wp-config.php, choose right top line, put

$locale='vi_VN';

(For example, in case of Vietnamese language)

A bit late in the discussion here. I had the same need today and found that there is a plugin available for that: CHL-Change HTML Lang. The language of the backend/admin interface can be in one language while the posts/articles/portfolios can be set in another language. After activating the plugin hit Settings→General and change the HTML language tag, i.e., en-US, etc.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!