Site with many languages => language detection and redirect to correct site

Vote:
 

Hi guys,

quick question. 

I have a site with 32 languages/countries like so. 

site.com/en/

site.com/nl-nl/

site.com/en-gb/

site.com/fr-fr/

site.com/de-de/

etc.

Now we want to implement language detection. So if a user goes to site.com we want to redirect him to the correct language/country.

What would be the best approach to go about doing this?

I have no experience with this. Do we do this by IP or CultureCode ?

Kind regards,

Vishal 

#196732
Edited, Sep 10, 2018 15:16
Vote:
 

Episerver uses MaxMind under the covers for GeoLocation persolalisation. There's a GeoLocation provider as documented in this blog http://www.jondjones.com/learn-episerver-cms/episerver-developers-guide/episerver-multilingual-websites/how-to-find-the-current-users-country-using-geolocation-in-episerver which will get the correct country based upon the IP. I would add confgiruation in your site to assign languages to countries or uses some partial matching with the country codes such as

var cultureInfos = CultureInfo.GetCultures(CultureTypes.AllCultures)
                              .Where(c => c.Name.EndsWith("-CH"));

To get out the correct culture which you can then use with the UrlResolver to get the correct language URL.
 

#196737
Edited, Sep 10, 2018 16:38
Vote:
 

Thanks for the info scott... I will dive into this and report back. 

#196785
Sep 11, 2018 16:18
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.