You should be able to do it fairly easy with a quick filter on locale. then return the required locale for a user.
(idea from http://wordpress.org/support/topic/admin-language-switcher?replies=4)
add_filter('locale','my_users_locale');
function my_users_locale($locale){
global $current_user;
get_currentuserinfo();
$current_user->ID;
if(is_admin() && $current_user->ID=='USERID')
$locale= 'es_ES';//whatever the correct syntax is
return $locale;
}
untested, and could be perhaps better expanded by a selection on the users profile page.
Hi, Rich ‘elfin’ Pedley. Thanks for your reply.
My blog is going to be in two languages(i.e., English,Spanish).Actually my requirement is to make the language switch work with all of the plugins i’m using and for the themes too.Is there any Filter or Hack to accomplish this task.
Thanks in advance,
Just for the back end? in theory it might work for that, you’d have to test and see what happens.
For the Fornt end i’m using the “transposh-translation-filter-for-wordpress” plugin.
Now,the client wants his admin interface must contain language-switcher.
Can you brief me where to add the above code?
thanks,
Hi Rich ‘elfin’ Pedley,
I have followed the link(http://wordpress.org/support/topic/admin-language-switcher?replies=4).It’s worked fine for the single Spanish user.
Now,I would like to have a language-switcher in between English and Spanish.So,the user can select his preferred language.Can we place any drop down box or country flags in the Admin interface?
Please advice me.
Glad that worked.
You’d need a full plugin created that adds available languages to a users profile and allows them to choose.
Hi..Rich ‘elfin’ Pedley,
Can we create a plugin for the admin interface.Where the admin can select one option form the list of languages.
Do u have any tutorial links or sources for creating Plugin for admin interface?
Thanks in advance,
These pages from the codex would be a starting point.
Writing a Plugin
Plugin API
Plugin Resources
but if you get stuck, let me know and perhaps I’ll write a quick plugin – though I’m surprised no-one has done this before.
Hello, I’m very new at this, I also need to do this, did you guys figure out what was the best way to have a wordpress switch to spanish and english. I was thinking of creating two wordpress and just running a link to each. Any help please? thanks guys.