I have this multilingual i18 site in 3 languages:

I want if you visit the site from holland (dutch browsers or IP's, your are redirected to the Dutch version http://landberg.at/nl. Users from Germany are redirected to the German version http://landberg.at/de

How can I achieve this? (I tried with some IP modules but can't get it to work?).

There must be a simple solution somewhere..?

Thanks

Comments

vijaythummar’s picture

I have not used this module but I think this may help you

https://www.drupal.org/project/ip2locale

Thanks,
Vijay Thummar

meez’s picture

My Drupal version is 7. I installed:

IP to Locale (7.x-1.x-dev) and also:

  • IP to Locale - WebHosting.info
  • IP to Locale - Redirect

But its not working? Its not redirecting.

In Configuration » Regional and language » IP to Locale » Country Code to Language Code mappings i have:

gb,en
ie,en
us,en
nl,nl
be,nl
de,de
at,de
ch,de

and in Pages for which redirection should be performed i have:

*
<front>

At Configuration » Regional and language » IP to Locale Providers:

WebHosting.info is enabled

I see in Debug this message "IP to Locale debug: Got language code 'en' from user cookie.". But it should be 'nl' ?

What am i doing wrong?

jaypan’s picture

You should redirect based on browser language, not IP address. Speaking as an English speaker in a non-English speaking country, before I learned Japanese, I used to hate it when websites decided I should be viewing the site in Japanese when I was using an English browser. If I wanted to view in Japanese, I would have been using a Japanese browser.

Contact me to contract me for D7 -> D10/11 migrations.