How to setup different admin and theme languages on your WordPress blog

June 21, 2013 at 11:25 am

I like me, you’re blogging in a language which is not your mother tongue, you might like to have the dashboard in your language. Here is a quick tip to use different languages on your WordPress blog or website.

Simply set the desired locale (on line 6) then add the code to your functions.php file.

<?php
     // setup one language for admin and the other for theme
     // must be called before load_theme_textdomain()

     function set_my_locale($locale) {
          $locale = ( is_admin() ) ? "en_US" : "it_IT";
          setlocale(LC_ALL, $local );
          return $locale;
     }
     add_filter( 'locale', 'set_my_locale' );
?>

Thanks to wp-snippet for the cool tip!

Tags: