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 :

[Links visible only for registered users]

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 [Links visible only for registered users] 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.

    [Links visible only for registered users]

    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

Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.