Employing a geolocation service can prove very helpful.
An alternative to this could be querying the requesting browser for user languages. If present, you could perform a redirect based on the related culture information.
This approach was a result of being involved in a project that did not permit the use of a geolocation service and and so determining the requesting browser culture information seemed the best approach.
In some instances, the requested language settings just didn't come across and the prevailing thought was either the browser wasn't sending that information along or that the user never selected a specific language of their choosing.
In the scenario of a user language being null/empty, the decision was made to send the user to what would be the default language of the web site. For this project, the default language was English and a navigation element was created to allow for switching between the different language offerings.
How to redirect by country
Hi
2 sites under Umbraco, Uk and Germany. I have added the relevant URLs under cultures.
If a user is in Germany how could I have them automatically redirect to the German site?
Thank you
Hi Colin,
You would use a service for example like Maxmind GeoIp to find out from what country the ip address is from.
https://www.maxmind.com/en/geoip2-country-database
You would look this up on the first request to the site and redirect from there.
Employing a geolocation service can prove very helpful.
An alternative to this could be querying the requesting browser for user languages. If present, you could perform a redirect based on the related culture information.
This approach was a result of being involved in a project that did not permit the use of a geolocation service and and so determining the requesting browser culture information seemed the best approach.
Hi guys
So the component above is chargeable which may not be an option. Alternatively if I query the user language I could use that approach.
What could/would determine the user language being null/empty?
Thanks
In some instances, the requested language settings just didn't come across and the prevailing thought was either the browser wasn't sending that information along or that the user never selected a specific language of their choosing.
In the scenario of a user language being null/empty, the decision was made to send the user to what would be the default language of the web site. For this project, the default language was English and a navigation element was created to allow for switching between the different language offerings.
is working on a reply...