Skip to content Skip to sidebar

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

Problem:
The client wanted to display the site in the language of the country where the user is located and had issues with WPML not recognizing a newly created subdomain.

Solution:
We informed the client that WPML only offers redirection based on the browser's language, not geolocation. To redirect users based on their location, a geolocation plugin is required. We provided links to our documentation on browser language redirection and a list of compatible geolocation plugins:

We also shared links to related support tickets that might be helpful:

Regarding the subdomain issue, we directed the client to our documentation on using WPML with different domains per language and advised that the domain/subdomain setup needs to be handled by the hosting provider:
How to use WPML with different domains per language
We also noted that sometimes the 'Not valid' notice for a domain in WPML can be a false-positive and suggested saving the settings to see if it works on the front-end. If issues persist, we recommended consulting with the hosting company or hiring a developer or a WPML contractor.

Please note that the solution provided might be irrelevant due to being outdated or not applicable to your case. If you need further assistance, we highly recommend checking related known issues at WPML Known Issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket.

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.

Tagged: 

This topic contains 6 replies, has 2 voices.

Last updated by nasehP 1 year, 3 months ago.

Assisted by: Mihai Apetrei.

Author Posts
April 10, 2024 at 4:36 pm #15505914

nasehP

Hi
How could i display the site in the language of the country where the user is located ?

April 10, 2024 at 7:17 pm #15506323

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

The only redirection WPML offers is related to the browser's language (https://wpml.org/documentation/getting-started-guide/language-setup/automatic-redirect-based-on-browser-language), not Geolocation, so you can't redirect users based on their current location.

Example of how browser-language redirection works: Chrome is set to English, the visitor is redirected to the English version of the website.

To redirect based on location, you would need a Geolocation plugin for that.

You can check our list of compatible plugins here:
https://wpml.org/plugin-functionality/geotargeting/

Here you can also find some existing tickets related to the same topic:

- https://wpml.org/forums/topic/i-wants-to-auto-translate-according-to-country/
- https://wpml.org/forums/topic/country-based-redirect/

I hope that you will find the information above helpful 🙂

Kind regards,
Mihai Apetrei

April 11, 2024 at 9:28 am #15507947

nasehP

Thank you
i plan to create some subdomain like fr.share-natural.com for french etc..
i use cloudflare to set up my DNS, could you help me to set up the WPML and cloudflare to modify the multilangue website ?

April 11, 2024 at 9:39 am #15508138

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Welcome back!

We have prepared some documentation for that topic here:
https://wpml.org/documentation/getting-started-guide/language-setup/language-url-options/how-to-use-wpml-with-different-domains-per-language/

But it is not much that we can do on situations like this. This has to be dealt with the hosting provider so that the domain/subdomain is set up correctly as explained in our documentation.

Not sure if it is helpful but the information in the existing ticket below might be a good guide along the way:
https://wpml.org/forums/topic/using-multiple-domains-the-added-on-domains-keep-redirecting-to-the-main-domain/

Also, please note that per our Support Policy, we can handle only one issue per ticket.

Continuing with one issue per ticket helps not only supporters to focus on one issue at once, but also enables other users to find solutions to their questions faster.

So, practically, we can handle only one issue/request per ticket.

I hope that you will find this information helpful. 🙂

Mihai

April 11, 2024 at 10:01 am #15508257

nasehP

Hi
Thank you
i create a subdomain but wpml doesnt reconize it
Can you check why ?
(i made a backup)

hidden link

Screenshot 2024-04-11 135818.png
April 11, 2024 at 10:15 am #15508385

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

Sometimes, that "Not valid" red notice is a false-positive message.

You can try to save it as is and see if it works on the front-end.

If it doesn't work, I recommend that you share the documentation with the hosting company.

Our Support Policy doesn't allow us to access customer's hosting panel and there's little that we can do in situations like this related to the domain setup.

We prepared the documentation and in case the hosting company can't help, I would recommend hiring a developer or a WPML contractor (https://wpml.org/contractors/) that can implement this correctly.

I hope that you will find this information helpful.

April 11, 2024 at 11:07 am #15508639

nasehP

Hi thank you
I m a little bit suprised to read some topics where the WPML support ask FTP and website access - and for my case i should hire someone.
Actually i just need a support to understand why, after doing everything that is recommended, the switch to fr doesnt work.
Could you provide me an advice based on my setup ?

April 11, 2024 at 3:32 pm #15510148

nasehP

Amazing support. Unforgettable.