跳到内容 跳到侧边栏

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>