2 Replies Latest reply on Mar 26, 2010 9:09 AM by actionscafe

    language detection

    Chorale0001 Level 1

      Hi.

       

      I'm making a website with both english and french version of it. Now i have no-to-little idea how to make the website detect the language of the OS or the browser and then automatiquely redirect the viewer to the propre index, Fr or Us.

       

      I'm kinda a novice in html, but when i google my probleme, i find people saying that this java code...

       

        var l_lang;
        if (navigator.userLanguage) // Explorer
          l_lang = navigator.userLanguage;
        else if (navigator.language) // FF
          l_lang = navigator.language;
        else
          l_lang = "en";

       

      ...Could solve the probleme.... however i don't know how to integrate that in my html, or in fact any java....

       

      I figured it will require a master index with no content except the detection code that will redirect to the real index with the right language.

       

      Any idea please ! i know this is a tough question from what i read on the web, but i really need this to work. and like all thing, there must be an easy solution somewhere.

       

      Thanks