I think that's a great idea, but I think the code needs expanding/correcting
to be functional (?)
reference: http://tech.irt.org/articles/js082/index.htm


this.lang=((this.ie)?navigator.browserLanguage:navigator.language).substring
(0,2)

of course it should be put after the this.ie evaluation, inside browser.js

This will return values like:
French ('fr'), German ('de'), Italian ('it'), Spanish ('es') and Portuguese
('pt') and English ('en')

I tested this in IE5.5 NS4.7 Ns6 successfully.

(BTW, has anyone looked into the Mac improvements for browser.js posted a
few days ago?)

Cheers,
Richard Bennett

[EMAIL PROTECTED]
www.richardinfo.com
(Everything running on, and ported to the 19/12/2000 snapshot of DynAPI2)
Find the DynAPI faq here:
http://sourceforge.net/docman/display_doc.php?docid=656&group_id=5757
Browse the mailinglist here:
http://www.mail-archive.com/index.php3?hunt=dynapi



----- Original Message -----
From: "Thomas Hering" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 08, 2001 12:51 PM
Subject: Re: [Dynapi-Dev] Browser Language Support


> I think it should be
>   is.lang=(is.ie)? navigator.browserLanguage:navigator.language;
>
> because other browsers like Mozilla, Opera, Konqueror, etc. only know
> 'navigator.language' (M$ proudly present you another fine
> proprietary method ;-) ).
>
> Thomas.
>
> Michael Pemberton wrote:
> >
> > oops.  is should have been
> >     is.lang=(is.ns) ? navigator.language:navigator.browserLanguage;
> >
> > Michael Pemberton wrote:
> >
> > > I believe we should add the following line to browser.js to allow for
language detection.
> > >
> > >     is.lang=(is.ns) navigator.language:navigator.browserLanguage;
> > >
> > > --
> > > Michael Pemberton
> > > [EMAIL PROTECTED]
> > > ICQ: 12107010
> > >
> >
> > --
> > Michael Pemberton
> > [EMAIL PROTECTED]
> > ICQ: 12107010
> >
>
> --
> ---------------------------------------------------
> fishfarm
> Thomas Hering
> Echternstr. 73
> 38100 Braunschweig
>
> Tel. +49 531 1232901    mailto:[EMAIL PROTECTED]
> Fax. +49 531 1232906    http://www.fishfarm.de/
> ---------------------------------------------------
>
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-dev
>


_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev

Reply via email to