Send foriegn users to specific landing page

Discussion in 'PHP' started by adzeds, Sep 10, 2010.

  1. #1
    We are looking to send our:
    German, French, Spanish, Italian and Dutch users to a landing page written in their language to explain our website and the buying process to them.

    My question, what is the best way to determine the users location/language and send them to our landing page for them.

    IP address? Browser language?

    Thoughts?
     
    adzeds, Sep 10, 2010 IP
  2. skum

    skum Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I would say that IP address is the most suitable, even though no method is perfect.
     
    skum, Sep 10, 2010 IP
  3. adzeds

    adzeds Well-Known Member

    Messages:
    1,209
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    100
    #3
    That is the method I am currently investigating..

    Just wanted to be sure that I am covering all possible options.
     
    adzeds, Sep 10, 2010 IP
  4. viron86

    viron86 Active Member

    Messages:
    426
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #4
    browser language is the best option
    the reason you should not use ip address is because that might be a chance that an American user who currently surfing net from France using some French ISP in that case your site will display content in french and it not necessary that the person should know French. So if i know French i would set my browser language to French and if i know English i would set my browser language to English which i very much logical.

    So i advise you to use browser language for internationalization or localization
     
    viron86, Sep 10, 2010 IP
  5. adzeds

    adzeds Well-Known Member

    Messages:
    1,209
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    100
    #5
    @viron86, good point!

    Next questions is, using PHP how easy is it to get the users language?
     
    adzeds, Sep 10, 2010 IP
  6. skum

    skum Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    In my opinion:
    IP is the way to go if you wish to assign a country to the visitor.
    Browser language if you're just changing the language of the site.
     
    skum, Sep 10, 2010 IP
  7. skum

    skum Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Getting browser language is easy:
    $language=substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2);
     
    skum, Sep 10, 2010 IP