Skip Navigation

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

Problem:
The client was experiencing an issue where Elementor container templates translated into Russian were still displaying in English on the Russian version of the site, despite using the correct translated shortcodes.

Solution:
The issue was resolved by modifying the code snippet used in the template. The original code forced the template to revert to English after switching languages, which prevented the Russian translation from displaying. The corrected code snippet ensures that the template switches back to the original language after fetching data in English, allowing the Russian version to display correctly. Here is the corrected code:

$curr_lang = ICL_LANGUAGE_CODE;<br />do_action('wpml_switch_language', 'en');<br />$usd_prices = json_decode(get_option('ukgov_visa_costs_usd'), true);<br />do_action('wpml_switch_language', $curr_lang);

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly 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 the problem persists, please open a new support ticket.

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 0 replies, has 1 voice.

Last updated by Carlos Rojas 1 week, 2 days ago.

Assisted by: Carlos Rojas.

Author Posts
March 21, 2025 at 9:53 am #16843552

christopherW-28

Background of the issue:
I am trying to use Elementor container templates on various pages of my site. I have translated these containers into Russian using the ATE, and the translations are complete with no missing sections. I placed the shortcode for the English container into the pages, and they appear fine in English. However, when switching to Russian, they only appear in English. I have cleared the server and browser cache, but it didn't work. I also tried putting the shortcode for the Russian translation of the 'visa application fees' container onto the Russian page, but it is still in English. The issue can be seen on this page: hidden link.

Symptoms:
The Elementor container templates appear in English on the Russian version of the page, despite being translated. Clearing the cache did not resolve the issue.

Questions:
Why are the Elementor container templates not displaying in Russian on the translated pages?
How can I ensure that the translated shortcodes display the correct language content?

March 21, 2025 at 11:28 am #16844000

christopherW-28

I updated the plugs as requested.

No change.

March 24, 2025 at 8:07 pm #16853906

christopherW-28

anyone there?

March 25, 2025 at 1:58 am #16854482

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

First of all, sorry for the late reply; it was due to a higher workload.

I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP)
Preferably to a test site where the problem has been replicated.

Your answer will be private, meaning only you and I can access it.

❌ Please back up your database and website ❌

✙ I need your permission to deactivate and reactivate the plugins and themes and change site configurations. This is also why the backup is critical.

✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.

Best regards,
Osama

March 26, 2025 at 6:21 pm #16865009

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi Chris,

Thanks for the access details. I checked the issue and found two workarounds to fix it:

1) Translate the shortcode ID by searching for the ID. (Kindly check this hidden link">screenshot)

2) Replace the shortcode widget with the template widget. (Kindly check this hidden link">screenshot)

I created a test page with the above approaches, and it worked correctly. (hidden link)

Best regards,
Osama

March 27, 2025 at 8:55 am #16866926

christopherW-28

Hello Osama

It doesn't work when I try this on a non-test page.

Please see for example:

hidden link

or

hidden link

Note I have even added both the shortcode and the template, still nothing.

This is driving me crazy!

Thanks

March 28, 2025 at 5:34 am #16871005

christopherW-28

Hello?

March 28, 2025 at 9:25 am #16871666

Carlos Rojas
Supporter

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

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

Hello,
My name is Carlos, and I will continue working on this ticket because my colleague Osama is on vacation.

Before we continue I kindly ask you to create a full site backup and update all outdated plugins that appear in this link: hidden link

Once everything is up-to-date, double-check if the issue persists.

Looking forward to your message.
Regards,
Carlos

March 28, 2025 at 9:33 am #16871689

christopherW-28

Hi Carlos

The site is still backed up, please proceed. I would be grateful if we could get this resolved today as this issue has blocked development for over a week.

Best regards

March 28, 2025 at 10:36 am #16872073

Carlos Rojas
Supporter

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

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

Hi,
Thank you for confirming you have a backup.

Can you update the outdated plugins and themes as described in my previous message?

March 28, 2025 at 10:47 am #16872131

christopherW-28

Hi Carlos - plugin update done

March 28, 2025 at 10:57 am #16872278

Carlos Rojas
Supporter

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

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

Please update the theme too, as mentioned on my previous message.

March 28, 2025 at 11:26 am #16872454

christopherW-28

all done

March 28, 2025 at 12:09 pm #16872690

Carlos Rojas
Supporter

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

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

Thank you very much.

I've run some tests but the issue persists. Can you create a staging site with a copy of the live site where we can run further tests without affecting the production site?

You can easily create a staging site using the WP Staging plugin: https://wordpress.org/plugins/wp-staging/

I have set your next message private so you can securely share the access credentials to the staging site.

March 31, 2025 at 9:52 am #16878378

Carlos Rojas
Supporter

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

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

Hi Chris,
Thank you very much for creating the staging site.

I have updated the outdated plugins (except Elementor Pro) and ran the Elementor database update. Then I deactivated all plugins, except the necessary ones, and you can see the text is translated correctly: hidden link

Please start activating the plugins, one by one, until the issue appears again and you find the culprit.

Let me know the results of the steps described above.

Note: I had to change the Language URL Format in WPML -> Languages to 'Language name added as a parameter' and re-save the permalinks because in this site, the 'Different languages in directories' option wasn't working (probably because of the URL of the staging)