Celtnet: how to make money online
Internet Marketing Make Money Online

Friday, May 26, 2006

Internationalizing your website



One of the problems that I faced with many of my web pages was the need to offer seamless internationalization. The ability to serve ads based on the local of the surfer. The problem became even more urgent as I added eBay misspelling searches and Amazon product additions to various pages. My default was going to be the US, but I didn't want surfers from other territories I was targeting from other territories feeling left out or alienated. Basically I wanted the page to default to the appropriate territory without the user having to click on anything.

Eventually I found the software 77 site, which makes a database of IP addresses linked to country available for free. Of course, once you have access to this database (which is delivered as a CSV file) it's possible to start doing some clever stuff. The site even provides some free example code in Perl, php and java on which you can base your own code.

Then I did some digging of my own on the web and I found that I could download and process the raw data for myself (I hate relying on someone else for a datasource if I don't have to. After about an afternoon's tinkering I had the code to download and parse the files in place. Then I started to write the code to actually use the database of IP to country name lookups I'd generated (which actually didn't take long). Then I started plugging it into my own code. So the eBay international misspelling tool so that international visitors are automatically taken to the correct eBay store.

After that I began working on a new page which demonstrates the code by showing a visitor their IP address and displays a flag for their country of origin. Moreover, and possibly more importantly the web page generated takes you step-by-step through the entire process of how to generate your IP to country name database as well as all the code to use it and do something useful with it. Everything you need, in short, to seamlessly internationalize your web pages.

If you want access to the page and all the technical detail then you can find the IP to country name mapping instruction page here. On this page you will find a description of what I did along with all the code necessary to implement this functionality on your own web pages. Remember you're basically getting for free what some companies are charging you $99 a month for. Moreover, because the code and all the instructions are provided you can modify this code to do precisely what you want it to. What could be better than that?

0 Comments:

Post a Comment

<< Home