SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Bi-Lingual Site

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2000
    Location
    France
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Bi-Lingual Site

    Hi,
    Have a french site that needs an english version. Firstly, is there a language detect script out there to redirect.
    Secondly, and alternatively, is there a script which has a conditional test of the sites language, perhaps chosen by user and placed in a cookie, and then it writes the appropriate text include for that language?? Just a thought. Thanks in advance.

  2. #2
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi jasonwcs,

    there is a navigator.language property, so something like this should work...

    if (navigator.language=='fr')
    location.href='frenchsite.html';

    insofar as translator programs, I've heard mention of some...check with www.google.com

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2000
    Location
    France
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply Vincent,

    With regards to the second alternative, what I meant to say was that I was thinking of setting up two different .txt files and write the appropriate one depending on a cookie telling me which language the user had chosen in the past. Possible?
    regards,
    Jason.

  4. #4
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep...if the user has their browser set to a certain language I believe that can be detected.

    This page talks about language detection:
    http://www.kallisys.com/lg/?lg=en
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  5. #5
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bon jour Jason,

    As Creole says, it is possible.
    If you need a cookie script, the one at: www.htmlgoodies.com is the easiest to understand and implement I've seen.
    You should also run off to msdn.microsoft.com and check what the language properties are for IE. Last time I searched (a year+ ago), there were 2 or 3 properties you could check.

    Creole: I only took a quick glance, but that site seemed to be about setting the language from the browser.

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •