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 thread is resolved. Here is a description of the problem and solution.

Problem: When the language is switched, there is a delay before the page is redirected

Solution: When you use a domain per language, an AJAX request is made, and then causes this short delay.

In WPML > Languages > Language URL format, there are three options when "A different domain per language" option is selected: Using this last option "Disable this feature", the request is not made with AJAX and without delay.

Relevant Documentation: https://wpml.org/documentation/getting-started-guide/language-setup/passing-session-data-between-languages-in-domains/

This topic contains 3 replies, has 2 voices.

Last updated by bettyG 4 months, 2 weeks ago.

Assigned support staff: Jamal.

Author Posts
May 30, 2019 at 2:01 pm #3923559

bettyG

When I click on the language switcher, it always takes a good 2 seconds before the browser begins to load the page in the other language. It doesn't take that long when I click on other links in the website. There's always a delay only when I click on the language switcher (I added two, one on the header menu and another on the footer menu. Both behave the exact same way with that annoying delay).

May 30, 2019 at 5:03 pm #3925239

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello,

Thank you for contacting WPML Support. I will be glad to help with this.

From what I can see right now, there is an ajax call to a WPML action called switching_language, which is used if you enabled the auto sign-in feature in WPML, see the attached image.
This feature keeps user signed in or out from all domains. It

You can disable this option, WPML will no longer keep you logged in across domains, if you want to access a private page on the secondary domain, you will need to log in again.

I hope this helps. Let me know if you have any doubts.

Best regards,
Jamal
WPML Support

May 30, 2019 at 6:07 pm #3925559

bettyG

I tried the solution proposed here https://wpml.org/forums/topic/delay-when-switching-between-languages/ but it's not working. The setting is now set to ''Disable this functionnality'' but the delay remains.

EDIT:Ah! I didn't uncheck ''auto sign-in''. The delay is gone now. Thanks!

May 30, 2019 at 6:12 pm #3925595

bettyG

My issue is resolved now. Thank you!