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.

Elementor users - please update WPML to the latest version to maintain compatibility. More details here - https://wpml.org/changelog/2024/12/wpml-4-6-15-critical-update-for-elementor-sites/
Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

Tagged: ,

This topic contains 17 replies, has 1 voice.

Last updated by Andreas W. 16 hours, 9 minutes ago.

Assisted by: Andreas W..

Author Posts
December 26, 2024 at 8:42 pm #16547615

andreS-64

Please help me just to exclude Bricks Builder strings from WPML translations list.

December 26, 2024 at 8:52 pm #16547616

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

I am sorry, but there is no simple way we could exclude them.

The Bricks Builder Widgets are expected to be translatable and this is something that is controlled direclty inside Bricks's code.

This is controlled inside /wp-content/themes/bricks/includes/integrations/wpml/wpml.php

December 27, 2024 at 2:32 pm #16548729

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Adding the following code to the end of the functions.php file of your Bricks Theme should exclude the placeholder when starting a new translation job:

add_filter( 'wpml_tm_job_field_is_translatable', 'wpmltriage_skip_acfdynamic_fields_in_bricks', 10, 2 );

function wpmltriage_skip_acfdynamic_fields_in_bricks( $is_translatable, $job_translate ) {
    $data = $job_translate['field_data'];
    if ( 'base64' === $job_translate['field_format'] ) {
        $data = base64_decode( $data );
    }
    // Check if data exists and contains '{acf_' at the beginning
    if (isset($data) && strpos($data, '{acf_') === 0) {
      return false;
  }

  return true;
}

The issue has been escalated towards our compatibility team for further revision. Once I received more feedback I will contact you on this ticket again.