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.

This topic contains 7 replies, has 1 voice.

Last updated by ziga pipan 2 hours, 58 minutes ago.

Assisted by: Prosenjit Barman.

Author Posts
November 21, 2024 at 11:33 am #16428707

ziga pipan

Background of the issue:
I'm using 2 slider revolutions on a page. Slider revolution uses a shortcode
en:[rev_slider alias="intro-1"][/rev_slider]
es:[rev_slider alias="intro-test-1"][/rev_slider].
When I'm translating a page, it does not show me a field for a shortcode. I'm inputting a slider revolution to ES version manually in Elementor, but every time somebody updates a site it resets to EN version.

Symptoms:
Shortcodes are not translating, and the ES version resets to the EN version after updates.

Questions:
Why does the ES version reset to the EN version after updates?
How can I ensure the shortcode field appears when translating a page?

November 21, 2024 at 12:14 pm #16428848

Dražen Duvnjak
Supporter

Languages: English (English )

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

Hello,

Thanks for contacting us.

While you wait for my colleague to take over the ticket, let me try to help you with the issue quickly.

That is expected, as you should not mix translation methods, you should either use a manual method or the WPML ATE editor. Mixing will overwrite each other.

1) I suggest following our guide and translating the Revolution slider as in our docs if you are using Wthe PML ATE editor:

- https://wpml.org/documentation/plugins-compatibility/creating-multilingual-sliders-with-revolution-slider-and-wpml/

2) Otherwise you can switch to WP editor and add manual translation, and edit 2nd language page how you wish. Note re-enabling and doing translation via WPMl ATE again, will overwrite manual changes done.

- https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/

Regards,
Drazen

November 21, 2024 at 1:22 pm #16429186

ziga pipan

How come CTM shows me this fields but ATE doesn't?
hidden link

November 22, 2024 at 9:00 am #16432631

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There!

I hope you're doing well. I've taken over this ticket and will be happy to assist you in this matter.

I understand your query. Please note that the ATE is designed to display only translatable strings. When using ATE for translation, HTML tags or shortcodes are stripped out, and only the text content is sent to the translation editor. If a shortcode has WPML support for any of its attributes, the values of those attributes will also appear in the editor for translation.

On the other hand, the CTE can display all content, including shortcodes, by default, as it is parsed through the rich text editor. The translation fields in CTE also support a rich text editor, allowing you to adjust the formatting as needed. I hope you can understand.

To translate the Revolution Slider shortcode, please refer to the guide below and ensure the shortcode attribute is registered for translation.

- https://wpml.org/documentation/support/language-configuration-files/translate-custom-shortcodes-with-wpml/#making-shortcodes-translatable

Once the shortcode is registered for translation, make a small edit to the page containing the shortcode and save the changes. Then, update the translation. The attribute value should now appear in the translation editor. Add the required translation for the attribute value, and save the changes. In this way, you can translate the attribute of the revolution slider shortcode and display the slider as per your needs.

You can also translate the entire shortcode from String translation if you want.

I hope I was able to clarify things for you. Feel free to reach out if you need further assistance or additional clarification. I’ll be happy to help!

Best regards,
Prosenjit

November 22, 2024 at 11:24 am #16433545

ziga pipan

Thank you, well put and unerstood.

I'd rather go with string translation option, feels like easier to to.

I have 1 revolution slider shortcode and 1 revolution slider carousel shortcodes on a homepage.

SLIDER EN
[rev_slider alias="intro-1"][/rev_slider]
SLIDER ES
[rev_slider alias="intro-test-EN-new"][/rev_slider]

CAROUSEL EN
[rev_slider alias="app-website-about1"][/rev_slider]
CAROUSEL ES
[rev_slider alias="home-carousel-1"][/rev_slider]

In order to find these strings, do I need to scan slider revolution plugin or elementor?

However, I scanned both, and I am easily able to find and translate SLIDER EN to SLIDER ES.

String translation does not find CAROUSEL EN shortcode to translate. I even searched in Admin Texts Translation.

What am I missing here?

November 25, 2024 at 5:24 am #16437815

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
I hope you're doing well. Sorry for the delay in responding due to the weekend.

If both sliders are added using shortcodes, the shortcodes should appear in String Translation, but only after the page/post containing the shortcode has been translated. Could you please try the following steps and check again?

- Ensure that the slider shortcodes are added to the page.
- Make a small change to the page title and save the page.
- Update the translation.
- Go to "WPML > String Translation" and check if the shortcodes are visible there.

However, I reviewed the homepage of your site and found that the sliders are added using the Slider Revolution widget of Elementor. In this case, please ensure you translate the slider following the standard method outlined in [this guide]. The slider should then appear correctly in each language.

Please let me know the update. I'll be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

November 25, 2024 at 2:19 pm #16440181

ziga pipan

Yes, I was using slider revolution widget. I now changed it to shortcode, and now I'm able to find the string in string translation.

but everytime I edit the page and update translation she string also updates to a wrong one. is that supposed to happen?

November 26, 2024 at 4:40 am #16442459

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There!
Thank you for the update.

When you make changes to a page or post that contains a shortcode and update the translation, the shortcode will also need to be updated. This is because the save action on the page or post also riggers the shortcode stored in the string translation. As a result, you may need to re-translate the shortcode from the String Translation section.

Rather than creating a new slider, my recommendation will be to translate the slider using the standard method outlined in the documentation I shared. This way, you won't have to update the shortcode in the String Translation each time, nor will you need to take any additional steps to display the translation. I hope you can understand.

Feel free to let me know if you have any other questions or need further assistance. I'll be happy to help.

Best regards,
Prosenjit

November 26, 2024 at 9:40 am #16443628

ziga pipan

got it, thank you