WPML admin_texts_um_fields not translating
-
Hello
I am helping translate a client site to German. All the built in form fields translate 100%. However, the custom fields don’t. I’ve added the strings I want to translate by
1/ Going to WPML -> String Translation -> Translate texts in admin screens
2/ Adding the fields that I want translated
3/ Translated the new fields visible in the “admin_texts_um_fields” Domain under String Translation.The custom strings never display correctly when viewing the pages in German. For example, if a custom field is used in Member Directory filter. The Country dropdown translates 100%. The custom field remains in English.
I had the same issue with The Events Calendar plugin and they have a workaround:
https://wpml.org/errata/the-events-calendar-admin-texts-do-not-translate/
Basically you paste this code in the functions.php file:
add_filter(‘tribe_get_single_option’, ‘tribe_options_multilingual’, 20, 3);function tribe_options_multilingual( $option, $default, $option_name ) { if (is_string($option)) { return apply_filters( 'wpml_translate_single_string', $option, 'admin_texts_tribe_events_calendar_options', '[tribe_events_calendar_options]' . $option_name); } else { return $option; } }
I tried something similar for Ultimate Member, but I didn’t succeed. Do you have a similar function I could use?
Thank you for your time.
Regards
Wesley
- The topic ‘WPML admin_texts_um_fields not translating’ is closed to new replies.