Jump to Navigation

New Drupal 6 module: IP to Locale

Image to accompany story

Drupal is set up fairly well for multilingual sites. However, it does make the assumption that each site version will be in a different language. It is quite feasible however, that there be two versions of a site in the same language. For example, A site which has a UK version, and a version for the Republic of Ireland. Both sites are written in English, but the content varies for each. Drupals multilingual features provide the perfect tools to allow 'translation' of content from one version of the site to another, but In a setup like this, it may also be desirable to automatically redirect users to a particular version of the site based on their IP address...

IP 2 Locale is able to redirect users to a specific site version based on the originating country of their IP address. It can use one or more IP lookup modules to translate the users IP address into a country code. Mappings can then be provided from a country code to a language code, and these mappings will be used to determine which version of the site to redirect to.

IP to Locale currently supports IP to Country lookup by one or more the following modules:

Comments

Anonymous's picture

Thank you for article

Anonymous's picture

Hi Kirk,

First of all congratulations to an extremely useful module. I am planning to use it on my site, in fact its already deployed.

Now that I am configuring it, I am wondering why you do not use drupal's standard method of defining language_COUNTRY codes according to the rfc4646 definition http://www.ietf.org/rfc/rfc4646.txt.

For example, It is common practice to have variants of english, e.g. UK/US/India.

In the case of my site I have would like to implement the following, standard mapping.

en (default)
us,en-US
in,en-IN

Unfortunately the module will not allow me to enter these values and I have to use non-standard definitions (us,us in,in).

I think this would be a simple upgrade and give your module more flexibility, while sticking to drupal's i18n methodology. MS offers the following list http://msdn.microsoft.com/en-us/library/ms533052%28VS.85%29.aspx

Looking forward to hearing your thoughts!

Best,
dascope

Please share your thoughts, comments and suggestions...

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
If you have your own website, enter its address here and we will link to it for you. (please include http://).
eg. http://www.kirkdesigns.co.uk