Skip Navigation

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 9 replies, has 2 voices.

Last updated by Andrey 1 year ago.

Assisted by: Andrey.

Author Posts
October 31, 2023 at 8:59 pm #14703893

jesus-alonsoE

Tell us what you are trying to do?
I'm attempting to translate the front-end element of the nectar_flip_box using the translation interface.

What is the link to your site?
[nectar_flip_box]hidden link
[form]hidden link

Thank you for your continued help!

Best regards,
Íñigo Cuervo

October 31, 2023 at 9:07 pm #14703899

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

If you could point out on the screenshots where the nectar_flip_box comes from, it would be helpful. In case it is a part of the WPBakery Page Builder, you need to follow a specific guide to register it for translation.

I recommend going through this article as it explains how to accomplish this: https://wpml.org/documentation/support/maintaining-wpbakery-page-builder-compatibility-with-wpml/#Page-builder-Shortcode-Structure-in-the-Language-Configuration-File.

October 31, 2023 at 10:27 pm #14704193

jesus-alonsoE

Thanks again for the quick response and for opening this new thread.

Recapping yhe chat discussion:

- Initially, the translations were displayed with HTML tags.

- Having experienced similar issues with other theme elements, I added the following custom XML:

php
Copy code
<shortcode>
<tag>nectar_flip_box</tag>
<attributes>
<attribute label="front_content" encoding="allow_html_tags">ANY_TAG</attribute>
<attribute label="content" encoding="allow_html_tags">ANY_TAG</attribute>
</attributes>
</shortcode>

- This resolved the tag issue, but now the content isn't being translated.

- The support colleague suggested searching in the string finder, and indeed the items were there. However, we'd prefer the translations to appear directly when translating the page itself.

That's where I currently stand.

image (7).png
image (8).png
November 1, 2023 at 4:01 pm #14709007

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

Thanks for explaining the situation. I understand better now. From what I gather, the "content" should be available in the translation editor. Have you attempted to make a small change to the original page, save it, and then go to the WPML translation editor?

November 1, 2023 at 4:58 pm #14709293

jesus-alonsoE

I just checked, and it show up in the translation editor. But it doesn't affect the front

Screenshot_31.png
November 2, 2023 at 1:13 pm #14716973

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

Did you make a tiny change to the original page? Does the same happen if you create a new test page and use the same nectar_flip_box element?

November 3, 2023 at 2:20 pm #14726431

jesus-alonsoE

That's what I did

November 6, 2023 at 2:13 pm #14738753

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

I have changed the following config in WPML → Setting → Custom XML Configuration in your staging site.

<shortcode>
<tag>nectar_flip_box</tag>
<attributes>
<attribute label="front_content" encoding="allow_html_tags">front_content</attribute>
<attribute label="content" encoding="allow_html_tags">content</attribute>
</attributes>
</shortcode>

to

<shortcode>
<tag>nectar_flip_box</tag>
<attributes>
<attribute label="front_content" encoding="allow_html_tags">ANY_TAG</attribute>

<attribute label="content" encoding="allow_html_tags">ANY_TAG</attribute>
</shortcode>

Then, you need to make a small change to the original page, save it, and complete translation.

November 9, 2023 at 7:34 am #14762507

jesus-alonsoE

Thanks a lot for your help.

I understand that the problem is in setting "ANY_TAG", how can I know what value I have to set for the next time?

November 9, 2023 at 9:54 am #14764197

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

It's important to examine the shortcode and its structure to determine which attribute to use.

For instance, in the following example:

[nectar_flip_box bg_color="#ffffff" text_color="dark" icon_family="iconsmind" icon_color="accent-color" bg_color_2="#0a0a0a" text_color_2="dark" h_text_align="center" v_text_align="center" image_loading="default" flip_direction="horizontal-to-left" front_content="

Canal de denuncias

" min_height="300" icon_size="50" icon_iconsmind="iconsmind-Box-Full"]

Canal de denuncias

Un canal interno confidencial y anónimo para crear un entorno ético y seguro.

Saber más[/nectar_flip_box]

The content to be translated is located under the "front_content" attribute. Therefore, this value should be set to translate it.

I hope this explanation is helpful.