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.

Our next available supporter will start replying to tickets in about 1.00 hours from now. Thank you for your understanding.

This topic contains 7 replies, has 2 voices.

Last updated by Lauren 1 year, 5 months ago.

Assigned support staff: Lauren.

Author Posts
April 24, 2018 at 10:42 am #1786546

Will

We have a theme where the string translations aren't working properly on one page. If you visit this page direct... hidden link

Then the first link in the menu 'New Yachts' isn't translating, but the others are. Then the page content & footer isn't translating either.

I've also added a comment to the site footer, so you can see current the language details are right.

However, if you change the language, to Swedish or Spanish, then back to German and visit the page, then it works fine.

April 25, 2018 at 1:46 pm #1811210

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thank you for contacting WPML support. I'll be happy to help you with this.

When I view hidden link, all items in the menu show as translated. Please see attached screenshot. Perhaps it is a caching issue that you aren't seeing it? Most of the page content looks translated as well, except for the email sign up. Have you translated the strings for the fields and sign up button?

Lastly, as for the comment in the footer, how are you adding the string "OUR KNOWLEDGE IS YOUR LUXURY"? Is this added in a widget or directly to the theme files? If it is added via a widget, you can translate the string via WPML -> String Translation. If it is added directly in the theme, it needs to be wrapped in a gettext call and then you can rescan the theme and it will show up in the string translation table. Please see https://wpml.org/faq/language-setup/ if you need assistance with using the gettext call.

Please let me know if you need any further assistance and I will be happy to help.

April 25, 2018 at 8:37 pm #1819620

Will

Hi Lauren,

This is a strange issue indeed. I've recorded a screencast to show what I mean if it helps... hidden link

Initially visiting the page, the New Yachts link in the menu isn't translated. Neither is the View Boat button, or the newsletter signup form.

Then clicking through to the About page in the same language, these are things are all translated.

Switching the about page to another language, Spanish for example, and again all these things are translated.

Clicking through to the Spanish version of the original page, and the items are all translated.

Finally, clicking through and visiting the German version of the original page, then bizarrely all the items mentioned are translated.

This isn't isolated to the German version, it's when landing on any language version of this specific page.

I've compared URLs and they're both the same. The hidden comment at the bottom of the HTML, shows the WPML languages are correct and we don't have any caching plugin running on this site. The issue happens for me regardless of browser.

Hopefully the screencast shows what I'm trying to explain and you can replicate the issue.

Cheers,

April 26, 2018 at 1:45 pm #1836837

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thanks for the screenshot, that was very helpful to understand what is happening.

Please go to WPML -> Languages and scroll down to the Language Filtering for Ajax section. Check the box to enable "Store a language cookie to support language filtering for AJAX".

NExt, I'd like to have you try a few things so we can try to isolate the issue. This is just to help me identify if it might be a conflict with another plugin or theme that is causing the problem.

** IMPORTANT ** Please backup a working copy of site files and database before continuing.

Update all WPML plugins & WordPress core.

Disable all plugins except WPML related and then temporarily change the theme to a default WordPress such as TwentyFifteen. With these settings, is the issue resolved?

April 30, 2018 at 9:25 am #1892922

Will

Hi Lauren,

I've tried 'Store a language cookie' option and this still doesn't work.

Unfortunately, trying disabling plugins and themes isn't an option we can do so easily. This is a live site, with high traffic. To do as you suggest, I will need to create a mirror of the site and try it there. When I've done this, I will send you over the details so you can see this too.

Cheers,
John

April 30, 2018 at 1:46 pm #1898688

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thanks John! If you prefer, you can make a snapshot of your site using the Duplicator plugin: https://wordpress.org/plugins/duplicator/. This will allow me to try and duplicate the error so that I can run further tests without interrupting your live site.

Once the snapshot is complete, either upload the snapshot ZIP file and the installer.php file to a file sharing service such as Dropbox (and share the link in your reply) or right click the Duplicator links in your wp-admin and paste in your reply.

Please note: It is important to reduce the size of the package so please exclude some paths like /cache or /uploads and also exclude archives and media files.

I will also need the username and password of an account that was created BEFORE creating the duplicator package.

I will enable the next reply to be private so only you and I have access to it!

May 8, 2018 at 7:48 am #2024644

Will

Hi

Just a quick update to say the issue isn't yet resolved, and we're still in the process of creating a duplication of the live site so we can try changing themes/removing plugins.

Unfortunately, given the nature of the site, it's not the most stright forward of tasks.

As soon as we have a duplicate running, we will try these extra steps and let you know.

Thanks,

May 8, 2018 at 2:24 pm #2033798

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Sounds great, thanks so much for the update. I'll wait to hear back the results of the tests.

The topic ‘[Closed] String Translations Not Working’ is closed to new replies.