Waiting for author
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.