This thread is resolved. Here is a description of the problem and solution.
Problem: The client is using Revolution Slider with shortcodes on a homepage and is facing issues with translating the carousel shortcode using WPML. The client finds that after editing the page and updating the translation, the shortcode updates incorrectly. Solution: 1. Ensure that the Revolution Slider shortcodes are added to the page and make a small change to the page title, then save the page. 2. Update the translation and check if the shortcodes are visible in "WPML > String Translation". 3. If using the WPML Advanced Translation Editor (ATE), avoid mixing translation methods as manual changes will be overwritten. Instead, follow the guide on creating multilingual sliders with Revolution Slider and WPML: https://wpml.org/documentation/plugins-compatibility/creating-multilingual-sliders-with-revolution-slider-and-wpml/ 4. If the shortcode is still not appearing, ensure it is registered for translation as per the guide on translating custom shortcodes with WPML: https://wpml.org/documentation/support/language-configuration-files/translate-custom-shortcodes-with-wpml/#making-shortcodes-translatable 5. After registering, make a small edit to the page containing the shortcode and save the changes, then update the translation.
If this solution does not resolve your issue or seems outdated, we recommend checking related known issues at 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 further assistance is needed, please open a new support ticket at https://wpml.org/forums/forum/english-support/.
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.
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?
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:
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.
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.
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!
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.
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.