Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

auto language detect

  • 12-07-2004 02:23PM
    #1
    Registered Users, Registered Users 2 Posts: 103 ✭✭


    Hi all,
    I need to put a few pages on my site in two different languages. Ive been looking all day, and I thought this would be really simple to do / easy to find... but it doesn't seem so..

    So basically what I want is to write a html/css page with both languages included and have the reader's browser only render the language set in their preferences and ignore the other language.

    Can this be done? I starting to think not... (I know it can be done with advanced coding, but that's not for me - its mostly just a personal site, nothing professional or commercial)

    any info appreciated :)


Comments

  • Registered Users, Registered Users 2 Posts: 7,742 ✭✭✭mneylon


    It can be done - yes.

    You might want to poke around http://www.hotscripts.com or one of the other online script archives.
    Basically you want to check the language string in the browser and push the relevant version of the site/page to them.


  • Registered Users, Registered Users 2 Posts: 103 ✭✭P&L


    It looks like that is what I'll have to do, I just assumed I would be able to do something like this:
    <p>
    <language=en>
    english language text
    </language>

    <language=fr>
    french language text
    </language>
    </p>

    With something in the head that detects the language and only renders text in-between preferred <language> tags. thus saving me work and making the pages much more manageable :D, similar priniciple to CSS kindof... everything on the one page

    guess Ive just gotten too used to things being easy for non-web guys

    cheers blacknight!


  • Registered Users, Registered Users 2 Posts: 7,742 ✭✭✭mneylon


    Try this query:
    http://www.hotscripts.com/cgi-bin/search.cgi?bool=AND&query=browser+language&catid=all

    Some of that is quite old, but it should give you a start


Advertisement