Language of client

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • OmyGOD

    Language of client

    Hi

    I am from Taiwan. I'm runnung an English version of WindowsXP and set
    the default charset to Big5(zh-tw).

    The question is the first time when I link to www.google.com, Google
    can determine that I'm using big5 and locate me on www.google.com.tw.

    At first I thought it determined form $_SERVER["HTTP_ACCEPT_LA NGUAGE"],
    but read through the $_SERVER array, there's nothing about "zh-tw" or
    "big5". Does anyone know how Google do that?

    Thanks

  • NSpam

    #2
    Re: Language of client

    OmyGOD wrote:[color=blue]
    > Hi
    >
    > I am from Taiwan. I'm runnung an English version of WindowsXP and set
    > the default charset to Big5(zh-tw).
    >
    > The question is the first time when I link to www.google.com, Google
    > can determine that I'm using big5 and locate me on www.google.com.tw.
    >
    > At first I thought it determined form $_SERVER["HTTP_ACCEPT_LA NGUAGE"],
    > but read through the $_SERVER array, there's nothing about "zh-tw" or
    > "big5". Does anyone know how Google do that?
    >
    > Thanks
    >[/color]
    look at the headers your browser sends

    Comment

    • John Dunlop

      #3
      Re: Language of client

      OmyGOD wrote:
      [color=blue]
      > The question is the first time when I link to www.google.com, Google
      > can determine that I'm using big5 and locate me on www.google.com.tw.[/color]

      Likely from Accept-Language (RFC2616 sec. 14.4).


      [color=blue]
      > At first I thought it determined form $_SERVER["HTTP_ACCEPT_LA NGUAGE"],[/color]

      Google does make use of Accept-Language to decide the
      language of your interface.


      [color=blue]
      > but read through the $_SERVER array, there's nothing about "zh-tw" or
      > "big5". Does anyone know how Google do that?[/color]

      Maybe you unwittingly set preferences. They don't know what
      you haven't told them, but they might remember things you
      told them in the past.



      --
      Jock

      Comment

      • R. Rajesh Jeba Anbiah

        #4
        Re: Language of client

        OmyGOD wrote:[color=blue]
        > I am from Taiwan. I'm runnung an English version of WindowsXP and set
        > the default charset to Big5(zh-tw).
        >
        > The question is the first time when I link to www.google.com, Google
        > can determine that I'm using big5 and locate me on www.google.com.tw.
        >
        > At first I thought it determined form[/color]
        $_SERVER["HTTP_ACCEPT_LA NGUAGE"],[color=blue]
        > but read through the $_SERVER array, there's nothing about "zh-tw" or
        > "big5". Does anyone know how Google do that?[/color]

        Google does country detection based on IP. Refer
        <http://www.ip-to-country.com/>

        --
        <?php echo 'Just another PHP saint'; ?>
        Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

        Comment

        Working...