דלג לתוכן דלג לסרגל צד

Waiting for author

Topic Tags: Compatibility

Overview of the issue

When using Bricksable with WPML, you might experience the following issue: texts from certain elements, such as the Content Toggle element, appear correctly translated in WPML’s Translation Editor but remain untranslated on the frontend.

Workaround

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

The issue seems to stem from the use of underscores in control names, which affects how Bricks integrates with WPML.

Instructions for the Content Toggle Element

  • Open the …/wp-content/plugins/bricksable/includes/elements/content-toggle/element-content-toggle.php file.
  • Replace:
    $this->controls['content_toggle_item'] = array(
  • With:
    $this->controls['content-toggle-item'] = array(
  • Replace:
    $content_toggle_item = ! empty( $settings['content_toggle_item'] ) ? $settings['content_toggle_item'] : false;
  • With:
    $content_toggle_item = ! empty( $settings['content-toggle-item'] ) ? $settings['content-toggle-item'] : false;

Apply the same fix to other Elements

  • Navigate to …/wp-content/plugins/bricksable/includes/elements/.
  • Open the relevant element's PHP file
  • Search for any control names using underscores (e.g. some_control_name) and replace them with dashes (e.g. some-control-name).

Update your content

  • Edit the original page in Bricks and re-add the element text, as the setting key has changed.
  • Retranslate the page.

We recommend contacting the Bricksable developers to implement this adjustment consistently across their plugin.

השאר תגובה

אנא הישאר בנושא והיה מכבד כלפי אחרים. אם אתה זקוק לעזרה בנושאים שאינם קשורים לפוסט זה, השתמש בפורום התמיכה שלנו כדי להתחיל צ'אט או לשלוח כרטיס.

אתה יכול להשתמש בתגים אלה:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>