WPML

Overview of the Issue

In Visual Composer, the content of a Raw HTML element is not sent to translation. The translated page shows it in the default language.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Add this code to the functions.php file of your theme:
    add_action( 'init', function () {
        if ( function_exists( 'vchelper' ) ) {
            vchelper( 'Filters' )->listen(
                'vcv:helpers:localizations:i18n:element:attributes:rawHtml',
                function ( $response ) {
                    $response[] = 'rawHtml';
                    return $response;
                }
            );
        }
    } );
  • Send the page to translation again.

Or use a Text Block element instead of Raw HTML: its content is sent to translation.

All known issues

Need Help with This Issue?

Ask a support question and we’ll look into it with you.