SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist Pixelateur's Avatar
    Join Date
    Feb 2006
    Location
    Hamburg, Germany
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Using IP address to get user location

    Hey,

    I am about to make a new website, which will be billingual (English/German). I want the site to appear in German whenever somebody located IN Germany, Austria or Switzerland visits the site. Whenever somebody OUTSIDE those countries views the site, the language should be English.

    Of course I know how to enable users to switch between the two languages manually, but what if I want the local language version to appear automatically as if by magic? Is there any way to do this using IP addresses? Is there any way to check in which country a user is based...?

    Probably not....

  2. #2
    SitePoint Wizard REMIYA's Avatar
    Join Date
    May 2005
    Posts
    1,351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You will have to maintain an IP database on your server, that will distinguish the users country on their IP adresses. Some exist for MySQL, and there were also some based on flatfile (my preference), that work pretty good.

  3. #3
    SitePoint Wizard REMIYA's Avatar
    Join Date
    May 2005
    Posts
    1,351
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is an easier method. Look at this thread:
    http://www.sitepoint.com/forums/showthread.php?t=321097


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •