This thread is resolved. Here is a description of the problem and solution.
Problem:
FacetWP filters not displaying translation correctly.
Solution:
Add the following code to the functions.php file:
// WPML Workaround for compsupp-6751 function wpml_compsupp6751_translate_facet_display_value( $label, $args ) { if ( class_exists('Sitepress') ) { $wpml_default_lang = apply_filters('wpml_default_language', NULL ); $wpml_current_lang = apply_filters( 'wpml_current_language', NULL ); if ($wpml_default_lang == $wpml_current_lang ) { do_action( 'wpml_register_single_string', 'FacetWP', 'Facet Display Value : '.substr($label, 0, 10), $label ); } // Apply the translation to the string $label = apply_filters('wpml_translate_single_string', $label , 'FacetWP', 'Facet Display Value : '.substr($label, 0, 10) ); } return $label; } add_filter( 'facetwp_facet_display_value', 'wpml_compsupp6751_translate_facet_display_value', 10, 2 );
Then, visit the page with the FacetWP filters in the default language.
Finally, go to WPML -> String Translation and search for strings containing "Facet Display Value: ".
After translating them, the FacetWP filters will display correctly in the secondary languages.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Our next available supporter will start replying to tickets in about 6.64 hours from now. Thank you for your understanding.
This topic is split from https://wpml.org/forums/topic/how-can-i-translate-the-acf-fields/
This topic contains 6 replies, has 2 voices.
Last updated by 1 year, 5 months ago.
Assisted by: Eran Helzer.