Skip to content Skip to sidebar

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

Problem:
The client was unable to translate certain buttons and headlines on their development site using WPML, suspecting an issue with custom XML configuration. The specific elements in question were created using WPBakery, and despite adding XML configuration for shortcode attributes, translations were not appearing.
Solution:
We advised the client to ensure their XML configuration was correctly set up for the specific shortcodes and attributes used in WPBakery. We provided guidance on creating and modifying the XML configuration file (https://wpml.org/documentation/support/language-configuration-files/). Additionally, we recommended translating URL-encoded shortcodes by following another guide (https://wpml.org/documentation/support/translating-urlencoded-shortcodes/). After reviewing the client's site directly and making adjustments to the XML, the translations were successfully updated.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your specific case, we highly recommend checking related known issues (https://wpml.org/known-issues/), verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If problems persist, please do not hesitate to open a new support ticket at WPML support forum.

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.

Tagged: 

This topic contains 19 replies, has 2 voices.

Last updated by Carlos Rojas 1 year, 1 month ago.

Assisted by: Carlos Rojas.

Author Posts
November 4, 2024 at 12:40 pm #16361008

Hendrik

Background of the issue:
I am trying to translate some buttons and headlines on my development site. I suspect the issue is related to custom XML configuration. The password to see the page is 'Kukk' without quotation marks. The issue can be seen at: hidden link

Symptoms:
I can't find or translate certain buttons and headlines. The buttons 'ASUKOHT' and 'PARKIMINE' and the string 'Hotell, restoran, konverents' are not found with WPML, resulting in a half-translated website.

Questions:
How can I make the buttons and headlines translatable?
Is there an issue with my custom XML configuration affecting translations?

November 4, 2024 at 1:47 pm #16361348

Carlos Rojas
WPML Supporter since 03/2017

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

Timezone: Europe/Madrid (GMT+01:00)

Hello,
Thank you for contacting us

Could you describe how these headlines and buttons were created? This will give us more information to understand if the issue is -as you pointed out- a problem with the XML in the Language Configuration File.

In the meantime, I'd recommend you take a look at this guide that explains how to create the XML: https://wpml.org/documentation/support/language-configuration-files/

Regards,
Carlos

November 4, 2024 at 1:58 pm #16361426

Hendrik

The page is done using WPbakery. Here's the page in question in raw bakery:

[vc_section full_width="stretch_row" content_placement="middle" css=".vc_custom_1728668165814{margin-top: 0px !important;border-bottom-width: 20px !important;background-image: url(hidden link) !important;background-position: center !important;background-repeat: no-repeat !important;background-size: cover !important;border-bottom-style: solid !important;border-color: #A72417 !important;}"][vc_row full_width="stretch_row" gap="15" overflow="default"][vc_column][vcj_heading_simple content2="Hotell, restoran, konverents" color_text="#FFFFFF" weight="500" italic="" size="default" animation_speed="2" animation_delay="0" margin="0 15px 15px 0"][vc_row_inner content_placement="middle" gap="10" overflow="default"][vc_column_inner width="1/4" overflow="default" css_animation="fadeIn"][vcj_button text="HOTELL" url="/hotell" target="_self" alignment="center" alignment_mobile="center" style="5" size="xlarge" radius="0" border_size="1" full="1" text_color="#FFFFFF" text_hover_color="#A72417" background_color="#A72417BF" background_hover_color="#000028" border_color="#FFFFFF" border_hover_color="#FFFFFF" animation_speed="2" animation_delay="0"][/vc_column_inner][vc_column_inner width="1/4" overflow="default" css_animation="fadeIn"][vcj_button text="RESTORAN" url="/restoran" target="_self" alignment="center" alignment_mobile="center" style="5" size="xlarge" radius="0" border_size="1" full="1" text_color="#FFFFFF" text_hover_color="#A72417" background_color="#A72417BF" background_hover_color="#000028" border_color="#FFFFFF" border_hover_color="#FFFFFF" animation_speed="2" animation_delay="0"][/vc_column_inner][vc_column_inner width="1/4" overflow="default" css_animation="fadeIn"][vcj_button text="PEAKOKASAAL" url="/peakokasaal" target="_self" alignment="center" alignment_mobile="center" style="5" size="xlarge" radius="0" border_size="1" full="1" text_color="#FFFFFF" text_hover_color="#A72417" background_color="#A72417BF" background_hover_color="#000028" border_color="#FFFFFF" border_hover_color="#FFFFFF" animation_speed="2" animation_delay="0"][/vc_column_inner][vc_column_inner width="1/4" overflow="default" css_animation="fadeIn"][vcj_button text="SEMINAR" url="/seminar" target="_self" alignment="center" alignment_mobile="center" style="5" size="xlarge" radius="0" border_size="1" full="1" text_color="#FFFFFF" text_hover_color="#A72417" background_color="#A72417BF" background_hover_color="#000028" border_color="#FFFFFF" border_hover_color="#FFFFFF" animation_speed="2" animation_delay="0"][/vc_column_inner][/vc_row_inner][/vc_column][/vc_row][/vc_section][vc_section el_id="koduleht-hero-section" css=".vc_custom_1728672862926{background-image: url(hidden link) !important;background-position: center !important;background-repeat: no-repeat !important;background-size: cover !important;}" el_class="text-center"][vc_row overflow="default" el_id="check-in-row"][vc_column shadow_for="inner" overflow="default"][vc_raw_html css=""]JTIwJTVCc2FsYm9zLWJvb2tpbmctcm93JTIwbGFuZyUzRCUyN2V0JTI3JTIwcGFnZS1sYW5nJTNEJTI3ZXQlMjclNUQ=[/vc_raw_html][/vc_column][/vc_row][vc_row overflow="default" el_class="max-width-1200 padding-bottom-80"][vc_column width="1/2" overflow="default" css=".vc_custom_1728669134195{background-color: #FFFFFF !important;}" el_class="hero-intro-text-inner"][vcj_heading_simple content2="- Villa Wesset -" italic="" size="default" animation_speed="2" animation_delay="0"][vcj_divider type="solid" radius="0" contentlayout="icon_option" icon="fa fa-wpexplorer"][vc_column_text css=""]Parima asukohaga hotell ja restoran Pärnus.
Asume jalutuskäigu kaugusel nii kesklinnast kui ka rannast. Meie hubases õhkkonnas saab läbi viia meeskonna üritusi, nautida hetki koos heade sõpradega ning võtta kerge lõuna või lihtsalt tee koos maitsva koogiga.[/vc_column_text][vcj_button text="ASUKOHT" url="hidden link" target="_blank" alignment="center" alignment_mobile="center" style="5" size="xlarge" radius="0" border_size="1" full="1" text_color="#A72417" text_hover_color="#FFFFFF" background_color="#FFFFFF" background_hover_color="#A72417" border_color="#A72417" border_hover_color="#A72417" animation_speed="2" animation_delay="0" margin="10px 0px 15px 0px"][vcj_button text="PARKIMINE" url="/parkimine" target="_self" alignment="center" alignment_mobile="center" style="5" size="xlarge" radius="0" border_size="1" full="1" text_color="#A72417" text_hover_color="#FFFFFF" background_color="#FFFFFF" background_hover_color="#A72417" border_color="#A72417" border_hover_color="#FFFFFF" animation_speed="2" animation_delay="0" margin="10px 0px 15px 0px"][/vc_column][vc_column width="1/4"][/vc_column][vc_column width="1/4"][/vc_column][/vc_row][/vc_section][vc_row full_width="stretch_row_content" equal_height="yes" content_placement="middle" overflow="default" el_id="Sündmused" css=".vc_custom_1730231278237{border-top-width: 20px !important;border-top-style: solid !important;border-color: #A72417 !important;}"][vc_column css_animation="none" width="1/2" overflow="default" css=".vc_custom_1730225247967{background: #00000000 url(hidden link) !important;background-position: center !important;background-repeat: no-repeat !important;background-size: cover !important;}" padding_tablet="100px 0px 100px 0px"][vc_row_inner content_placement="middle" overflow="default" css=".vc_custom_1730229035765{background-color: #00000000 !important;}"][vc_column_inner el_class="text-center" text_align_inline="center" overflow="default" css=".vc_custom_1730228693264{background-color: #00000000 !important;}"][smaily_for_wp_newsletter_form][/vc_column_inner][/vc_row_inner][/vc_column][vc_column width="1/2" shadow="shadow1" max_width="735" css=".vc_custom_1533130656186{padding-top: 145px !important;padding-bottom: 145px !important;}" padding_tablet="70px 40px 70px 40px"][vc_column_text css=""][tribe_events_list][/vc_column_text][/vc_column][/vc_row]

What is interesting though is that on another page /hotell I can translate the buttons below the fold.
Note: Now that I look at that page I can't seem to find the translated buttons on there. --> hidden link
So it seems like WPML is picking up some of the content but then forgets about it.

I have added this XML config:
<wpml-config>
<shortcodes>
<shortcode>
<tag>vcj_heading_simple</tag>
<attributes>
<attribute encoding="base64">content2</attribute>
</attributes>
</shortcode>
<shortcode>
<tag>vcj_button</tag>
<attributes>
<attribute encoding="base64">text</attribute>
</attributes>
</shortcode>
</shortcodes>
</wpml-config>

And still nothing is showing up on the translation page.
All the other pages are also done using bakery.

November 4, 2024 at 2:05 pm #16361458

Hendrik

Just to clarify why I added this:
<wpml-config>
<shortcodes>
<shortcode>
<tag>vcj_heading_simple</tag>
<attributes>
<attribute encoding="base64">content2</attribute>
</attributes>
</shortcode>
<shortcode>
<tag>vcj_button</tag>
<attributes>
<attribute encoding="base64">text</attribute>
</attributes>
</shortcode>
</shortcodes>
</wpml-config>

As I thought the strings were base64 encoded at first since I saw some base64 strings in the translation manager. Not the case. Even when removing the base64 encoding directive I still can't find any actual strings for the buttons/headlines.

November 4, 2024 at 2:08 pm #16361486

Hendrik

I can give you direct access, backup the site and you can take a look at the backend first-hand.

November 4, 2024 at 2:10 pm #16361493

Carlos Rojas
WPML Supporter since 03/2017

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

Timezone: Europe/Madrid (GMT+01:00)

Thank you very much for your messages.

In this case, I would need to access the site and take a closer look. I have set your next answer private and you will find the fields to share the access credentials securely.

Although I won't make any changes on the site, it is recommended to create a full backup before sharing the credentials.

November 4, 2024 at 3:00 pm #16361769

Carlos Rojas
WPML Supporter since 03/2017

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

Timezone: Europe/Madrid (GMT+01:00)

Thanks!

I added a line to the XML you created -which was correct- and updated the EN translation. As you can see, it is working correctly now.

Let me know if you find any other issue related to the XML.

November 4, 2024 at 3:13 pm #16361829

Hendrik

Right I do see it.
Ow.
I'm going to tackle the other pages then the same. Interesting that it's a link that needs to be made visible using XML... hmmhmm
NOt closing this thread just yet. Will see if I can get the site covered thisway.

November 4, 2024 at 3:22 pm #16361848

Carlos Rojas
WPML Supporter since 03/2017

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

Timezone: Europe/Madrid (GMT+01:00)

Excellent!

In any case, your XML was 100% correct and it was the solution to this issue, you just missed updating the translations 🙂

November 4, 2024 at 3:36 pm #16361930

Hendrik

Ok this seems tricky and I seem to still not 100% understand the logic behind this. For example:

There's an element --> [vcj_text_with_frame
it has all these attributes --> line_color="rgba(255,255,255,0.1)" animation="fadeInUp" animation_speed="2" animation_delay="0"]
And as the ... <content> (if this would be a correct element) that is automatically generated by the theme code --> <p class="invert">Kõigi mugavustega ühene standard tuba.</p>

<h4><span class="invert">SINGLE</span></h4>
And the content ends--> [/vcj_text_with_frame]

How can I get the stuff in between this element? - and yes, it is a real problem still as I can't find the content in there. This is the page --> hidden link
Thank you!

November 4, 2024 at 7:54 pm #16363218

Hendrik

Ok. I think I got that solved. Reason was that wpbakery added extra <p> tags in its shortcode output.
Still not through all though.

November 5, 2024 at 8:56 am #16364851

Carlos Rojas
WPML Supporter since 03/2017

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

Timezone: Europe/Madrid (GMT+01:00)

Great! Then I will be waiting for your feedback 🙂

November 5, 2024 at 12:14 pm #16366461

Hendrik

Another day, another issue:
The element:
[vcj_heading_animation content2="%5B%7B%22text%22%3A%22v%C3%B5ta%20%C3%BChendust%22%7D%2C%7B%22text%22%3A%22v%C3%B5ta%20%C3%BChendust%22%7D%5D" content_fixed="Küsimuste korral" heading="h2" size="xl" color="#FFFFFF" fixed_color="#FFFFFF" custom_class="text-shadow-black"]

I added this:
<shortcode>
<tag>vcj_heading_animation</tag>
<attributes>
<attribute>all</attribute>
<attribute>text</attribute>
<attribute>content2</attribute>
<attribute>content_fixed</attribute>
</attributes>
</shortcode>

How long does it update the translation manager?
OR
Is this wrong altogether?

Thanks

November 5, 2024 at 12:42 pm #16366721

Carlos Rojas
WPML Supporter since 03/2017

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

Timezone: Europe/Madrid (GMT+01:00)

Hi,

Could you tell me what is the value that goes in the attribute 'content2'?

November 5, 2024 at 12:48 pm #16366734

Hendrik

It should be "Küsimuste korral", not sure why it's changed. Could that be the case?