I’m using Justin Tadlock’s Members plugin to create new roles and WP Role on Registration to display them on the registration form.
I’ve got a multilang site (English and Spanish) and I’ve localized my custom taxonomies using qTranslate.
I can’t use qTranslate’s quicktags in the Role Label field on the Member’s plugin because it doesn’t save it properly (even with $new_role_label = strip_tags( $_POST['role-label'] );
commented out on role-new.php) and I can’t go into the database to make the changes there because then it breaks.
I’ve seen very scarce info about the WP function translate_user_role but I’m not sure it. There’s not much else to go on.
I don’t know the function you mention either, but I would venture to guess that that applies to default roles only anyhow.
Still, the link you posted does contain a pointer in the right direction. It speaks of “dummy gettext calls”, which is exactly what you have to do.
In the following we will adjust the global
$wp_roles
object oninit
and hook a filter to theget_option( 'wp_user_roles' )
call.The values of the
$translated_roles
array will now appear in your theme’s / plugin’s.pot
file.