Skip Navigation

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

Problem: Custom language switcher is not working correctly.

Solution: Manually setting redirects in .htaccess file resolved the issue.

0% of people find this useful.

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

Last updated by sergeyS-14 2 years, 1 month ago.

Assigned support staff: Lauren.

Author Posts
July 24, 2018 at 2:24 pm #2575255


I am trying to: Get working redirect from original to translated page.

Link to a page where the issue can be seen:

Original page: hidden link
Translated page: hidden link

I expected to see:

If i am changing .ru to .com like this: hidden link it redirect me to correct page hidden link

Instead, I got:
But if a change .com to .ru like so hidden link its open same page but on different domain like this hidden link

But its shold be the transated page: hidden link

I hope em i clear.

July 25, 2018 at 1:11 pm #2579569


For now i make redirects in .htaccess to prevent this action... but i wold like to get some solution... Because i nee to redirect a lot of pages there...

July 25, 2018 at 6:07 pm #2581277


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.

How are you changing .com to .ru? Are you using different domains per language, or are you trying to change the main url for your site from .com to .ru? Please check to make sure that you have selected your slugs to be translated in WPML -> Settings, and in the Custom Post types, make sure your property slug is registered and translated.

Also be sure to re-save your permalinks after making changes.

July 26, 2018 at 2:03 pm #2584778


Changing by hands directly in url of the browser, and of course Prmalinks was resaved.

July 26, 2018 at 2:42 pm #2585001


Languages: English (English )

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

Do you have a language switcher set up on your site? If not please add one, either in the menu, the footer or the sidebar. These options are in WPML -> Settings.

When you use the language switcher, does the URL convert correctly? I think it is expected that if you are only changing part of the URL in the browser, the rest of the URL does not necessarily change. The correct way to change languages is using the language switcher.

Please let me know the results.

August 2, 2018 at 2:06 pm #2605616


We have language switcher as php code in header.php in our theme

I solve my problem manually i cant wait, so the solution in my case is to making redirects in .htaccess from english slugs to russian slugs if domain is

Its just to you know the problem exist. And may be some one else will discover the same one.

August 24, 2018 at 3:21 pm #2673631


The bad thing thats new duplicated url is appear so step by step i will need to redirect all the pages...