Different Language for Frontend vs Backend

I use an English WordPress package and this is very well.

Now, I would like to translate some elements of the blog (like “posted on”, “comments”) etc., but do leave the dashboard interface intact in English.

Is there any mechanism to translate just the site elements?

7

You can do the following:

  1. Get the the language pack (e.g. de_DE.mo) from wordpress.org. If the language pack isn’t available as a standalone download, you could also use the .mo file which is bundled in the WordPress ZIP-file for your language. Located under wp-content/languages.
  2. Move the .mo file to wp-content/languages/ of your default (english) WordPress installation.
  3. Change the WPLANG constant in wp-config.php to the new locale (e.g. de_DE)
  4. In your functions.php add the following filter:

functions.php

add_filter('locale', 'wpse27056_setLocale');
function wpse27056_setLocale($locale) {
    if ( is_admin() ) {
        return 'en_US';
    }

    return $locale;
}

Leave a Comment