Detecting user language

Hi,

I need to use all tools available to collect information about the users language settings, in the browser, in the OS , etc..

I need to figure out if there is any "other" language other than the standard english presented in the guest computer/browser.

I found the navigator object of javascript, but it only returns the first language in the browser language list which is also prioritized...

how can I get the complete priority list and info from other locations with regards to language ?

thanks,
LVL 1
moshemAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David S.Commented:
0
moshemAuthor Commented:
thanks, any chance I can do it in javascript ?
0
David S.Commented:
Nope. JavaScript can't access HTTP Headers directly.

You could use PHP or another server-side language to pass that information to a JavaScript script if you wanted, however.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

moshemAuthor Commented:
I know,

I need a way to determine what languages are installed on the user machine.. even if it is IE specific.

if one has three languages, like English, Russian and French... how can I detect the entire list  ?
0
BadotzCommented:
>>Nope. JavaScript can't access HTTP Headers directly.

Yes, it can. Depending on your web server - I use IIS - you can run JavaScript on the client AND the server. I've been doing this for a decade with no problems whatsoever.
0
David S.Commented:
> you can run JavaScript on the client AND the server.

I meant client-side JavaScript. Server-side JavaScript is a whole different ball game and of course has similar functionality to other server-side languages.
0
BadotzCommented:
I was referring to your comment, "You could use PHP or another server-side language" where you seem to imply that JavaScript is *not* a server-side language.

Clarity above all else...
0
David S.Commented:
Thanks for making me clarify that.  Since I've never used server-side JavaScript myself, I tend to think of it only as a client-side language.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
moshemAuthor Commented:
well.. I am getting nowhere with this...

I tried using server side scripting..

I made an XMLHTTP call from my HTML via Javascript to an ASP page which returns the ACCEPT-LANGUAGE header it gets, and directly from IE this works great, I get the full list of languages configured by IE, example :

en-US,he-IL;q=0.7,ru-RU;q=0.3


but, when I make an AJAX call, the HTTP call does not include the ACCEPT-LANGUAGE header and thus, my server side script can't return it to me.... firefox does...

any ideas how to proceed from here ? how to force IE to send the header via AJAX too ?

thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.