Register WordPress Users – Translate Custom Fields
-
Hi, I’m configuring a e-learning website that works with Buddypress plugin.
For register there are two parts.
First part is “Account Details” (user, mail, and password). This fields are provided for wordpress system
Second part “Profile Details”. The profile details are custom fields created by myself in:
Wordpress<Users<Profile FieldsThe website I’m configuring is in two languages, Spanish and Portuguese. Spanish as a main languages
When I visit spanish version all form is in Spanish.
When I visit portuguese version all form is in portuguese exept the “Profile Details”.
That’s reasonable, all other register features are provided by the system, so if the system is in two languages this fields are translated automatically.
But I created custom fields, and the system don’t have in the .po .mo files this new items. So, custom profile fields are not translated.
I tried to solve, using [:es][:pt] in custom fields name to filter languages. This kind of code works in all website, but doesn’t works for profile custom fields.Using WordPress 3.9.2
Budypress 2.02
Mq Translate 2.6.7I asked before the same in budypress forum, they give me a solution but they are not sure, and tell me to ask in MqTranslate Forum.
So, do us know if this solution will work?
A possible solution could be this one given on the mqTranslate support.add_filter(‘get_the_author_description’, ‘qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage’);
Try to use this (in bp-custom.php or functions.php), but i’m absolutely not sure it would work:
add_filter(‘bp_get_member_profile_data’, ‘qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage’);
and if it works, you can use the [:es][:pt] shortcodes
Ask also on the plugin support.
The topic ‘Register WordPress Users – Translate Custom Fields’ is closed to new replies.