18 March 2009 4 comments Web development
My play site Crosstips.org is available in British English and American English. Obviously the difference is small but it's important.
What I've done is that if you're located in, say, France and visit the site it offers you the following language choices:
But if you're located in, say, England it only offers you the following language choices:
And likewise, if you visit the site from US computer you just get two options and it uses the
en-us.crosstips.org domain. As an American or a Brit why would you be interested in the other English? I think this is a really good usability trick. It reduces the noise by removing options.
How did I do that? The answer is the GEO IP. I used the geo module in nginx and a config file I found here and then I wrote a script that uses this
GEO variable (fron Nginx) to change the options accordingly.