WPML translate & betheme
Hello
I followed your instructions
Now I only have muffin builder in my post but the translation is not working properly :
original :
https://www.breatharianworld.com/alekseev-egor/
translate english :
yet I have added in the function file betheme :
add_filter( 'wpml_decode_custom_field', 'wpmld_compsupp_5901_decode', 10, 2 );
function wpmld_compsupp_5901_decode( $custom_field_val, $custom_field_name ) {
if ( $custom_field_name === 'mfn-page-items' ) {
$custom_field_val = maybe_unserialize( base64_decode($custom_field_val) );
}
return $custom_field_val;
}
add_filter( 'wpml_encode_custom_field', 'wpmld_compsupp_5901_encode', 10, 2 );
function wpmld_compsupp_5901_encode( $custom_field_val, $custom_field_name ) {
if ( $custom_field_name === 'mfn-page-items' ) {
$custom_field_val = base64_encode( serialize($custom_field_val) );
}
return $custom_field_val;
}
thank you
Marie
Comments
Hello,
I noticed that this post in all other languages looks similar except Italian (I think the original one).
Did not you change the display of the main post meanwhile?
Best regards
Hello
I have modified the original by passing all the texts via muffin rather than half with the editor and the other half via muffin as you advised me.
Then I went to the translations and updated them.
and yet I still have the old content
I can see that rest of the translations except Italian are still in WPBakery.
Please, try to remove these translations, and translate them again.
Thanks
hello :
i m lost
I can't solve this translation problem with Betheme:
do I have to put back this code in the function file at each update?
add_filter( 'wpml_decode_custom_field', 'wpmld_compsupp_5901_decode', 10, 2 );
function wpmld_compsupp_5901_decode( $custom_field_val, $custom_field_name ) {
if ( $custom_field_name === 'mfn-page-items' ) {
$custom_field_val = maybe_unserialize( base64_decode($custom_field_val) );
}
return $custom_field_val;
}
add_filter( 'wpml_encode_custom_field', 'wpmld_compsupp_5901_encode', 10, 2 );
function wpmld_compsupp_5901_encode( $custom_field_val, $custom_field_name ) {
if ( $custom_field_name === 'mfn-page-items' ) {
$custom_field_val = base64_encode( serialize($custom_field_val) );
}
return $custom_field_val;
}
Thank you
Marie
Please send us WordPress dashboard access privately through the contact form, which is on the right side at http://themeforest.net/user/muffingroup#contact and we will check what might be the reason.
Notice!
Please attach a link to this forum discussion.
Thanks
You need to open each version of the post and remove the content from the WPBakery.
Thanks
Hello
I deleted it and the content came back. So I deleted the translation and now I have the same problem as before, see screenshot.
https://www.breatharianworld.com/wp-admin/admin.php?page=wpml-translation-management%2Fmenu%2Ftranslations-queue.php&return_url=%2Fwp-admin%2Fedit.php%3Fs%26post_status%3Dall%26post_type%3Dpost%26action%3D-1%26m%3D0%26cat%3D186%26seo_filter%26readability_filter%26filter_action%3DFilter%26paged%3D1%26action2%3D-1%26lang%3Dit%26admin_bar%3D1&trid=1283&language_code=fr&source_language_code=it
Thank you for your help
Unfortunately, we have checked all of the settings, and we could not find the root cause.
Can you please, contact the WPML support and ask them about this issue as well please?
I contacted the dev team, and they said that WPML recently sent us a code that we should add to our theme, and it could be the source of the problem.
Please, let me know when the WPML support answer you, and what did they say.
Thanks