Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:

How do I make the content between the opening and end tag of a shortcode translatable in the translation page? E.g. in the following shortcode:

[et_pb_blurb title="Gruppenangebote" content_max_width="100%" admin_label="Text Gruppenangebote" _builder_version="4.21.0" _module_preset="default" header_level="h2" header_font_size="30px" body_font_size="20px" body_line_height="1.8em" background_color="#FFFFFF" background_enable_image="off" custom_padding="63px|80px|0px|80px|false|false" custom_padding_tablet="63px|80px|0px|80px|false|false" custom_padding_phone="63px|17px|0px|17px|false|false" custom_padding_last_edited="on|phone" link_option_url="https://azibene.ch/bei-uns/" header_font_size_tablet="40px" header_font_size_phone="26px" header_font_size_last_edited="on|phone" body_font_size_tablet="20px" body_font_size_phone="18px" body_font_size_last_edited="on|phone" global_module="12675" saved_tabs="all" global_colors_info="{}"]<p><span>Entdecken Sie die komplette Auswahl an Gruppenangeboten "</span></p>
[/et_pb_blurb]

Solution:

1. Go to WPML -> Settings -> Custom XML Configuration.

2. Add this code:

<wpml-config>
  <shortcodes>
    <shortcode>
      <tag>et_pb_blurb</tag>
    </shortcode>
  </shortcodes>
</wpml-config>

3. Click the Save button.

4. Change something on the page with this shortcode and press the Update button. This will also trigger a change to the translation. (The pencil icon will change to a circled arrow icon).

5. Edit the page with the Advanced Translation Editor and see if you can translate the content of this shortcode.

Relevant Documentation:

https://wpml.org/documentation/support/language-configuration-files/

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.

This topic contains 1 reply, has 2 voices.

Last updated by Itamar 1 year, 4 months ago.

Assisted by: Itamar.

Author Posts
November 1, 2023 at 10:54 pm #14711571

janH-80

Hello,

How do I make the content between the opening and end tag of a shortcode translatable in the translation page? E.g. in the following shortcode:

[et_pb_blurb title="Gruppenangebote" content_max_width="100%" admin_label="Text Gruppenangebote" _builder_version="4.21.0" _module_preset="default" header_level="h2" header_font_size="30px" body_font_size="20px" body_line_height="1.8em" background_color="#FFFFFF" background_enable_image="off" custom_padding="63px|80px|0px|80px|false|false" custom_padding_tablet="63px|80px|0px|80px|false|false" custom_padding_phone="63px|17px|0px|17px|false|false" custom_padding_last_edited="on|phone" link_option_url="hidden link" header_font_size_tablet="40px" header_font_size_phone="26px" header_font_size_last_edited="on|phone" body_font_size_tablet="20px" body_font_size_phone="18px" body_font_size_last_edited="on|phone" global_module="12675" saved_tabs="all" global_colors_info="{}"]<p><span>Entdecken Sie die komplette Auswahl an Gruppenangeboten »</span></p>
[/et_pb_blurb]

The translation page shows me the "title" attribute but not the content "<p><span>Entdecken Sie die komplette Auswahl an Gruppenangeboten »</span></p>"

Thank you very much for helping out.

Best,
Jan

November 2, 2023 at 12:09 pm #14716043

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+02:00)

Hi, Jan.

You should follow our guides on adding WPML configuration files.

https://wpml.org/documentation/support/language-configuration-files/

Specifically, please also check our guide on Maintaining the Divi Builder Compatibility with WPML.

https://wpml.org/documentation/support/maintaining-divi-builder-compatibility-wpml/

You can try the following.

1. Go to WPML -> Settings -> Custom XML Configuration.

2. Add this code:

<wpml-config>
  <shortcodes>
    <shortcode>
      <tag>et_pb_blurb</tag>
    </shortcode>
  </shortcodes>
</wpml-config>

3. Click the Save button.

4. Change something on the page with this shortcode and press the Update button. This will also trigger a change to the translation. (The pencil icon will change to a circled arrow icon).

5. Edit the page with the Advanced Translation Editor and see if you can translate the content of this shortcode.

I tried it on my test site, and it worked.

Regards,
Itamar.

November 7, 2023 at 12:12 pm #14746865

janH-80

Thank you Itamar

I was confused because the title of the module did show automatically in the translation page. Therefore I did not even try to add the XML.

Thank you for your help!

Kind regards,
Jan