Skip Navigation

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.

This topic contains 16 replies, has 3 voices.

Last updated by Laura 2 months, 1 week ago.

Assigned support staff: Ahmed Ibrahim.

Author Posts
March 27, 2019 at 2:34 pm #3472021

Ahmed Ibrahim
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

I did a quick debug to our code, and I think I have found a way to let you be able to translate the selective modules at the translation editor, the update is related to the function "should_handle_shortcode_content" here: wp-content/plugins/sitepress-multilingual-cms/compatibility/divi/class-wpml-compatibility-divi.php:128
This function works when trying to translate the page and it makes sure to not show the global modules fields at the Translation Editor, so when changing this function to always return true like this:

public function should_handle_shortcode_content( $handle_content, $shortcode ) {
        if (
            strpos( $shortcode['tag'], 'et_' ) === 0 &&
            strpos( $shortcode['attributes'], 'global_module=' ) !== false
        ) {
            $handle_content = false;
        }
        return true;
    }

After this, all global modules will be available for translation, (the selective and non-selective), so this could be a workaround for now, because it will give you the option to translate the selective modules at the translation editor.

I have made these changes at the latest beta 4.2.5b1

After applying these changes, make an update to your original page and try to translate again using the translation editor, and you should see your selective modules available for translation.

Please let me know if that helps you.
Best Regards.

July 16, 2021 at 11:42 am #9216919

Laura
Supporter

Languages: English (English ) Italian (Italiano )

Timezone: Europe/Rome (GMT+02:00)

Fixed in WPML 4.3.7