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.
Tagged: Compatibility
This topic contains 8 replies, has 2 voices.
Last updated by Andrés 1 year, 6 months ago.
Assisted by: Andrés.
Author | Posts |
---|---|
October 20, 2022 at 7:27 am | |
viktoriaJ |
Hello! 1) hidden link - services block with photos. The headings and links on photos are not translatable. (screenshot 1) I am ready to provide access to my website. |
October 20, 2022 at 8:21 am | |
October 20, 2022 at 8:25 am #12276501 | |
Andrés Supporter
Languages: English (English ) Spanish (Español ) French (Français ) Timezone: Europe/Paris (GMT+02:00) |
Hello there, As we just discussed, we need to render these new widgets compatible. For this please add the plugin Shortcodes by United Themes and try to replica the issue: Once we have a working environment, we will be able to help you. Regards |
October 20, 2022 at 8:53 am #12276749 | |
viktoriaJ |
Hello, I have successfully added Shortcodes by United Themes plugin to the test website. |
October 20, 2022 at 2:58 pm #12280895 | |
Andrés Supporter
Languages: English (English ) Spanish (Español ) French (Français ) Timezone: Europe/Paris (GMT+02:00) |
Thank you for your help. I've created a couple of pages and added the "Princing table" and "Information box" widgets. Please try the following: - Make a full backup of your site. <wpml-config> <shortcodes> <shortcode> <tag>ut_service_column_vertical</tag> <attributes> <attribute>headline</attribute> </attributes> </shortcode> <shortcode> <tag>ut_fancy_list</tag> <attributes> <attribute>list_description</attribute> <attribute encoding="urlencoded_json">values</attribute> </attributes> </shortcode> <shortcode> <tag>ut_pricing_table</tag> <attributes> <attribute>button_text</attribute> <attribute>currency</attribute> <attribute type="area" encoding="urlencoded_json">features</attribute> <attribute encoding="urlencoded_json">button_link</attribute> </attributes> </shortcode> <shortcode> <tag>ut_information_box</tag> <attributes> <attribute>headline</attribute> <attribute type="link" encoding="vc_link">link</attribute> </attributes> </shortcode> </shortcodes> </wpml-config> - Add this code into your functions.php file: add_filter( 'wpml_pb_shortcode_encode', 'wpml_pb_shortcode_encode_urlencoded_json', 10, 3 ); function wpml_pb_shortcode_encode_urlencoded_json( $string, $encoding, $original_string ) { if ( 'urlencoded_json' === $encoding ) { $output = array(); foreach ( $original_string as $combined_key => $value ) { $parts = explode( '_', $combined_key ); $i = array_pop( $parts ); $key = implode( '_', $parts ); $output[ $i ][ $key ] = $value; } $string = urlencode( json_encode( $output ) ); } return $string; } add_filter( 'wpml_pb_shortcode_decode', 'wpml_pb_shortcode_decode_urlencoded_json', 10, 3 ); function wpml_pb_shortcode_decode_urlencoded_json( $string, $encoding, $original_string ) { if ( 'urlencoded_json' === $encoding ) { $rows = json_decode( urldecode( $original_string ), true ); $string = array(); foreach ( $rows as $i => $row ) { foreach ( $row as $key => $value ) { if ( in_array( $key, array( 'text', 'title', 'features', 'substring', 'btn_text', 'label', 'feature' ) ) ) { $string[ $key . '_' . $i ] = array( 'value' => $value, 'translate' => true ); } else { $string[ $key . '_' . $i ] = array( 'value' => $value, 'translate' => false ); } } } } return $string; } - Refresh your original page and translate it again. As you can see, it works fine in the Sandbox site, does it work for you? |
October 23, 2022 at 9:17 am #12294715 | |
viktoriaJ |
Hello, With the information box everything is working now. Thank you! |
October 24, 2022 at 6:03 am #12297331 | |
Andrés Supporter
Languages: English (English ) Spanish (Español ) French (Français ) Timezone: Europe/Paris (GMT+02:00) |
Hey there, Could you please create a new page and with a pricing table with all the information that you need to translate? Furthermore, have you contacted and received any updates from the author? |
October 24, 2022 at 9:03 am #12298451 | |
viktoriaJ |
Hello, |
October 24, 2022 at 9:05 am #12298501 | |
viktoriaJ |
And yes, I have also contacted theme support. Their answer was the following: |
October 24, 2022 at 10:23 am #12299369 | |
Andrés Supporter
Languages: English (English ) Spanish (Español ) French (Français ) Timezone: Europe/Paris (GMT+02:00) |
Unfortunately you are using your test site. As mentioned before, it works perfectly fine in ours, so could you follow my instructions on the test site I provided for you |