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.

Here's my thing:

I'm using a plugin that has multilang capabilities. The point is that the language translation in my country lang is very bad and it makes more complex than simpler my work. :D. So is there a way to force a plugin to not to use multilanguage and be showed, at least, in English?

share|improve this question

1 Answer 1

What's the plugin? Is it using custom translations in mo/po files? Is there an admin interface which allows you to set the plugin locale?

There is a generic filter which you might be able to add to the plugin code to set the language which might look something like the following (obviously set the language to what you want:

add_filter('locale', 'wpse_get_locale');

// returns the locale based on user preference
function wpse_get_locale($locale) {
// get_current_user_id uses wp_get_current_user which may not be available the first time(s) get_locale is called
    if (function_exists('wp_get_current_user'))
        $loc = get_user_meta(get_current_user_id(), 'user_lang', 'true');
    return isset($loc) && $loc ? $loc : $locale;
}

However I wonder if it might not be easier to improve the translation of the plugin by editing the mo/po files or whatever they use for the string translation?

share|improve this answer
    
The plugin is Role Scoper and it has a myriad of options i can't understand the effect of. So i need, at least at the beginning, to understand what the functions are doing and then providing some translating corrections... –  SolidSnake Sep 30 '12 at 1:36

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.