Language recognition

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • root-boy

    Language recognition

    Okay, this trick could be seen on GOOGLE, if your system's default language
    is not English. If it is, for example, Russian, GOOGLE automaticaly
    recognizes it and loads all the links and the such (the interface in other
    words) in Russian.

    My question: if and how it could be done, using PHP?

    Thank you in adavance.

    ----------------------
    Oh boi! It's root-boy!
  • John Dunlop

    #2
    Re: Language recognition

    root-boy wrote:
    [color=blue]
    > Okay, this trick could be seen on GOOGLE, if your system's default language
    > is not English. If it is, for example, Russian, GOOGLE automaticaly
    > recognizes it and loads all the links and the such (the interface in other
    > words) in Russian.
    >
    > My question: if and how it could be done, using PHP?[/color]

    The Accept-Language header can restrict "the set of natural languages
    that are preferred as a response to [a] request" (RFC2616, sec.
    14.4).



    --
    Jock

    Comment

    • R. Rajesh Jeba Anbiah

      #3
      Re: Language recognition

      "root-boy" <jhn@hot.ee> wrote in message news:<Xns94AB65 D0F225Arootboy@ 194.126.101.124 >...[color=blue]
      > Okay, this trick could be seen on GOOGLE, if your system's default language
      > is not English. If it is, for example, Russian, GOOGLE automaticaly
      > recognizes it and loads all the links and the such (the interface in other
      > words) in Russian.
      >
      > My question: if and how it could be done, using PHP?[/color]

      You mean browser's language detection? If so, try

      print_r($_SERVE R);
      echo $_SERVER['HTTP_ACCEPT_LA NGUAGE'];

      If you ask, detecting the language of texts that inputted in a form,
      sorry.. I don't know. Once I was searching for such stuff, but
      couldn't find anything.

      --
      "Democracy: Where all citizens are politicians and all politicians
      are citizens"
      Email: rrjanbiah-at-Y!com

      Comment

      Working...