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:
Language switcher not working in site home page

Solution:
The issue is related to a few Managed Hosting the site url and home url is not set properly in the database and managed by the server.
To resolvr, add the site_url and home_url constants in wp-congig.php

define( 'WP_HOME', 'https://site_domain.com/' );
define( 'WP_SITEURL', 'https://site_domain.com/' );

Tagged: 

This topic contains 23 replies, has 2 voices.

Last updated by kruger-hotel-group-agA 3 weeks, 4 days ago.

Assigned support staff: Raja Mohammed.

Author Posts
September 11, 2019 at 4:55 am

kruger-hotel-group-agA

I am trying to: add menu language switcher from wpml (dont get confused with "choose language" menu item I have created that from custom links.

also wpml menu language switcher is not working properly for homepage..for other pages it is working fine.

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

add menu language switcher on the menu currently i have removed it.

Instead, I got:

September 11, 2019 at 6:17 am
September 11, 2019 at 6:19 am #4550791

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Once you have the package ready share the link here. I have enabled private fields for you to securely share the details.

Kind regards
Raja

September 11, 2019 at 9:51 am #4552297

kruger-hotel-group-agA

can I provide the site file by all in one migration plugin?

September 11, 2019 at 9:59 am #4552357

kruger-hotel-group-agA

I am not able to send you the duplicator files..please resolve the issue on the website.

September 11, 2019 at 10:03 am #4552383

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes, Send the All in one migration file, Or If you can provide a copy of your wp-content folder and database that would help as well. Please compress the copy of the wp-content folder and upload it to g-drive or dropbox and share the link.

This requires debugging which requires the site to be set up in the local environment and not possible in your live site.

September 12, 2019 at 5:58 am
September 15, 2019 at 5:22 pm #4575111

kruger-hotel-group-agA

hello
I have send you the link to .wpress file which i have get from all in one migration plugin...

Have you check it..please resolve the issue why menu language switcher is not working on homepage.

September 16, 2019 at 3:37 am #4576107

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I'm still checking on this issue. I am having issues in extracting wpress file. I will keep you posted in a couple of hours.

September 16, 2019 at 4:48 am
September 16, 2019 at 3:22 pm #4581983

kruger-hotel-group-agA

ok..I am waiting.

September 17, 2019 at 4:35 am #4585573

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please check my previous private reply, I have requested to migrate the site to our private server. There is some issues in extracting the .wpress compressed file.

Please let me know here once the migration is complete.

September 17, 2019 at 4:04 pm #4589993

kruger-hotel-group-agA

done..Migration is complete..please check now.

September 18, 2019 at 7:32 am #4593227

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thanks for the migration, The issue seems to simple than I have thought off,

Disabling browser language redirects resolved the issue, I have disabled it on the live site. This should work fine now.

Probably the custom switcher is conflicting with browser language redirect option. I am not actually sure about the reason since the language switcher is not coming from WPML switcher options.

Please verify the same.

Kind regards
Raja

September 18, 2019 at 9:20 pm #4599985

kruger-hotel-group-agA

no it is not working correctly on the live site..

please check it again.

still the same issue.

language switcher is not working on homepage.