[wp-hackers] Different languages in the admin and on the outside

Alex Polite mylists at polite.se
Tue Mar 17 08:03:25 GMT 2009


On Tue, Mar 17, 2009 at 09:40:35AM +0200, Nikolay Bachiyski wrote:
> On Mon, Mar 16, 2009 at 22:29, Alex Polite <mylists at polite.se> wrote:
> > I'd like to use English in the admin interface and Swedish on the outside.
> > Is there a way of accomplishing that, short of writing a new plugin?
> >
> 
> It's not short of writing a new plugin, but it's really short:
> 
> function different_locale_for_admin( $locale ) {
>     return is_admin()? 'en_US' : sv_SE';
> }
> 
> add_filter('locale', 'different_locale_for_admin');
> 

Thanks.

I'll think I'll pack that up as a plugin and realease it just as
exercise in getting started with plugins.

alex


-- 
http://pipedreams.polite.se/about/




More information about the wp-hackers mailing list