[wp-hackers] How to force WordPress to display messages only in English

Alexander Concha alex at buayacorp.com
Sun Jul 3 20:53:07 UTC 2011


On Sun, Jul 3, 2011 at 10:26 PM, Pasquale Puzio
<pasquale.puzio at gmail.com> wrote:
> Hi all,
>
> I'm using "Theme my login" plugin to move in front-end all the
> features concerning login, registration, password recovery, etc.
> The language of admin area is italian (unfortunately my customer
> doesn't know english :-/) but the website should be entirely in
> english (it's an international social network).
> In order to do so also the error messages (login failed, etc.) should
> be in english but now they are of the same language of admin area, so
> in italian.
>
> How can I force WordPress to display these messages only in english?
> Is there a solution different from to select english as admin area language?

I have not tested it, but something like this may work.

if ( is_admin() ) {
	function foo_change_admin_locale() {
		return 'it_IT';
	}
	add_filter('locale', 'foo_change_admin_locale');
}

-- 
Alexander Concha
http://www.buayacorp.com


More information about the wp-hackers mailing list