Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I use a 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 mecanism to translate just the site elements?

share|improve this question

migrated from serverfault.com Aug 27 '11 at 17:07

This question came from our site for system and network administrators.

3 Answers 3

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;
}
share|improve this answer
    
now, what do you mean by "install your language pack"? should I uninstall the wordpress, and install the new wordpress, but say French? I don't want to uninstall my English wordpress. –  serhio Sep 2 '11 at 15:01
1  
No, you don't have to reinstall anything. Just download WP in your desired language an copy the language file from wp-content/languages/ to your original english WP install and modify wp-config.php as described above. Or just download the fr_FR.mo file from this site. –  rofflox Sep 2 '11 at 15:05
    
I had not the wp-content/languages/ folder, so I should create it. After performing that manipulation, I has the vice-versa of what I would. I have now the admin panel in Romanian, but the page (even logged or not) - in English. Perhaps I should translate the theme... –  serhio Sep 7 '11 at 9:00
    
Of course, you need the theme translated. But the backend should be in English not Romanian if you set is_admin() in the filter above. –  rofflox Sep 7 '11 at 9:16
    
I added this code at the end of the functions.php file of the current (twenty ten) theme... Is that correct? –  serhio Sep 7 '11 at 16:58

You can use plugins for that: http://wordpress.org/extend/plugins/kau-boys-backend-localization/ or http://wordpress.org/extend/plugins/wp-native-dashboard/

share|improve this answer
1  
Welcome to our site. Please add an explanation: What do these plugins, what are the differences? –  toscho Oct 6 '12 at 14:39
1  
I think there are doing exactly the same. (I just use the first one...) You can install different language files and with the plugins you can change the language for the backend independently. Both plugins provide Dashboard switches for the language, a login language select box and an add-on to the profile page for user-specific language. –  zodiac1978 Oct 8 '12 at 6:34

What you need is to translate your theme. If your theme has a .pot file then it is easy to translate. Just follow the steps at

http://www.appthemes.com/blog/how-to-translate-a-wordpress-theme/

Else, you will need to edit the theme files and change the words at each instance.

share|improve this answer
    
my theme (twenty ten) has the folder "wp-content/themes/twentyten/languages" and there are only a .pot file inside... –  serhio Sep 7 '11 at 13:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.