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

Last updated by Rajeeb Banstola 1 month, 2 weeks ago.

Assigned support staff: Rajeeb Banstola.

Author Posts
August 15, 2019 at 11:42 pm

Corey Grist

I am trying to:
Enabled different domain for language. Domain 1 (default) is English. Domain 2 is French. When using domain 1, click French language switcher in menu, site changes to domain 2 and displays French. When go to domain 2, website loads in French. When I click the English language switcher when using 2 domain, the site loads as domain 2 (in French, does not switch to domain 1 in English).

Link to a page where the issue can be seen:
fceeontario.ca (domain 2)

I expected to see:
Click "English" in menu language switcher. I expect to load cfsontario.ca (domain 1) and English content.

Instead, I got:
Click "English" in menu language switcher. I get domain fceeontario.ca (domain 2) and French content.

August 16, 2019 at 1:13 am #4403879

Rajeeb Banstola

Hi,

Did the language switcher work before? If so, try deactivating plugins other than WPML plugins and see if it works.

Can you also confirm that you are following this guide? Make sure all the server settings are set correctly:
https://wpml.org/2016/04/use-wpml-different-domains-per-language/

August 16, 2019 at 6:18 pm #4407847

Corey Grist

Hi there,

Yes, I had it set to Language name added as a parameter and everything worked fine. Changed it to different domains and now can't switch from French to English.

I tried deactivating the plugins, it did not resolve the issue. I also did set all the correct settings as instructed at https://wpml.org/2016/04/use-wpml-different-domains-per-language/

August 18, 2019 at 8:07 am #4411731

Rajeeb Banstola

Hi,

I would like to request your WordPress login details in order to debug the issue more. I've marked your next reply as private.

August 18, 2019 at 4:02 pm
August 20, 2019 at 5:31 am #4420559

Rajeeb Banstola

Hi,

Thank you for the details.

I'm getting "Not Valid" error on Language URL Format - different domain per language option. This would mean your secondary domain is not setup properly.

I would need FTP details and permissions to perform debugging steps on your site. I've marked your next reply as private as well. Let me know if you have any questions.

August 25, 2019 at 2:49 am
August 27, 2019 at 6:00 am #4462903

Rajeeb Banstola

Hi,

Thank you for the details.

Can you please update all plugins including WPML to the latest version and see if it works?

Once you update plugins, please follow the below steps as well:
1. Go to WPML > Support.
2. Click on 'troubleshooting' link.
3. Click on the 'Clear the cache in WPML' button.

Let me know if you have any other questions.

August 27, 2019 at 12:51 pm #4466803

Corey Grist

Hi! WordPress has been updated to the latest version and all plugins, including WPML.
I also follow your instructions to Clear the case in WPML.

After completing these tasks, the issue is still persisting.

August 28, 2019 at 4:43 am #4471135

Rajeeb Banstola

Hi,

Thank you for confirming.

In your site, Home and Site url were being changed according to the request URL which was causing the issue. I added the below code to your wp-config.php file:

define('WP_HOME', '<em><u>hidden link</u></em>');
define('WP_SITEURL', '<em><u>hidden link</u></em>');

The language switcher is working correctly now. Please check and let me know.