Directing different countries traffic?

Discussion in 'Programming' started by TheGrecianHero, Dec 5, 2007.

  1. #1
    What I want to be able to do is direct visitors from one country to one website, and visitors from another country to the same website with different language based on their own country. For instance, a American site that is in English, and a Chinese site that is in Chinese, both at the same url, with some sort of code dividing the users accordingly without me having to put a big ugly "USA" "CHINA" link on there.

    Can someone tell me how to do something like this?
     
    TheGrecianHero, Dec 5, 2007 IP
  2. TheGrecianHero

    TheGrecianHero Well-Known Member

    Messages:
    622
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Anyone know?
     
    TheGrecianHero, Dec 6, 2007 IP
  3. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #3
    normal procedure for this type of thing is to have a script that runs on a new session start that picks up their IP and checks that against a db of IP->country. You then have a rules engine that dictates for each country which language they initially see and set that as a session variable.

    After that it is simply a case of on each page load check the session variable for their language and display the correct text.
     
    AstarothSolutions, Dec 7, 2007 IP
  4. orielo

    orielo Peon

    Messages:
    175
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    if your interested i have ip2country database and php demo script for sale,
    for $9.99 only.
    PM me for more details.
     
    orielo, Dec 7, 2007 IP