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 3.16 hours from now. Thank you for your understanding.

This topic contains 7 replies, has 2 voices.

Last updated by Bobby 5 months, 3 weeks ago.

Assigned support staff: Bobby.

Author Posts
April 17, 2019 at 9:00 pm #3634775

jimM-5

Issues:
-Automatic redirection to German and English (UK) site is not working.
-Using the language switcher sends me back to the main US site, even if I change my browser language to English UK or German.

I have tried the following:
-Changing browser languages
-Clearing cookies and using private/incognito windows
-Confirmed that my settinsg are set to auto-redirect (screenshot attached)
-Confirmed that no languages are hidden
-Confirmed that WPML and related plugins are up-to-date
-Confirmed that the code shows the correct HTML language for German ("de-DE") and UK ("en-gb")

Link to a page where the issue can be seen:
hidden link
hidden link
hidden link

Please note that this site has been up for 3 years, and the automatic redirection was working for the German site. We recently launched the UK site, and noticed that the redirection was no longer occurring.

Also note that we have a custom language switcher due to the fact that our Spanish site is outside of the main site and developed by another company.

Any help or guidance you can provide is greatly appreciated!

April 18, 2019 at 2:33 am #3635571

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

the following are my results :

1. I am able to switch back and forth between all the languages using the language switcher

2. I set my browser (Chrome) to German language and test on an incognito window and the redirection worked as expected

3. Setting to "English UK" the redirect did not work as expected

-> if you go to WPML->languages->edit languages , what is your English UK default locale ?

April 18, 2019 at 3:13 pm #3640359

jimM-5

HI Bobby -
Thanks for your quick response! The default locale is set to "en_gb" (see attached screenshot). Please note that we are using the Ukrainian language as a base because the client is insisting that the URL be "/uk". However, we customized the default locale and hreflang to be "en_gb".

April 18, 2019 at 8:18 pm #3641785

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

this is the reason the redirection is currently not working as your browser is picking up the Ukrainian language instead.

as a test i switched my browser's language to "Ukrainian" and it worked as expected with your language.

The recommendation here is to use a new custom language add for English UK , unfortunately the language code 'uk' is indeed taken by Ukrainian and can only be changed in the database which is not recommended

here you can see the explanation from our developers

hidden link

April 18, 2019 at 9:23 pm #3641903

jimM-5

Hi -
I had a feeling that was the case. I guess we will need to find a workaround. I tried the link you sent, but it brings me to a WordPress login screen. Is this information available publicly somewhere?

April 19, 2019 at 8:10 pm #3648153

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

My apologies that was the wrong link but either way i believe 'uk' might still work as well.

After some testing and reviewing current known issues , try the following and let me know your results

add British English as your default language in your browser

then open hidden link in an incognito window and the redirection to 'uk' should work

there is a known issue for the redirect to EN UK which happens when visiting an English link it will not perform the redirect but if you visit from another language the redirect works as expected

let me know your results please

April 30, 2019 at 8:25 pm #3714833

jimM-5

Sorry for the delayed response - I was out of town traveling. You are correct, the redirect works from /de to /uk, but not from main English domain of hopsteiner.com. Do you know if this issue is on a roadmap to be resolved in the future? Thanks again for your help and guidance.

May 1, 2019 at 12:35 am #3715327

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

thank you for confirming , at the moment i do not have an ETA on this issue but it has been brought to our developer's attention

The topic ‘[Closed] Redirection is not working properly’ is closed to new replies.