Here is another way you can go... (from another related post)
Bismarck
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> I am developing an application that will be
> accessable in multiple languages. I would
> like the application to be able to identify the
> location of the client and present them with
> the page in the proper language.
>*snip*<
> Does anyone know of a DB or published
> addressing schem that woul help identify the
> location of the user?
I think I can do you one better...
Most browsers will send you a list of languages they accept in the
#cgi.Accept_Language# variable. If you examine that, you should see
ISO Language codes (like 'en-us'). I would *think* that most non-US
browsers would send a list of languages they'd like, and you should
be able to act accordingly.
The format of the string should be something like:
en-us,fr-ca;q=0.8,as;q=0.5,ar-jo;q=0.3
There you have a comma separated list of all the codes the browser
can accept, followed optionally by a semi-colon and q=<float>. Float
should between 1.0 and 0.0 & represents the order of preference for
the preceding language code. In the string above, the user would
prefer en-us, but he'll settle for fr-ca, as, or ar-jo in that order.
If you look in Internet Explorer, go to Tools->Internet Options....
Click on the Languages... button on the General tab, then click the
Add... button. You should get a fairly exhaustive list of language
codes to choose from.
Odds are that will be more useful than the geographic location of the
browser. In theory, if I speak French, but I live in the US, I could
add 'fr' to my browser with a higher priority than English & get my
native language even tho I'm technically located in the US. (Mais
mon francais est tres mauvais, alors je ne suis pas susceptible de
faire cela.)
Check out RFC 2616 (the HTTP/1.1 spec) for complete details on the
Accept-Language header.
FYI: I get this header w/ IE5.01 & IIS 4.0. YMMV for other servers
& browsers.
Best regards,
Zac Bedell
========================================
Zachary S. Bedell,
Chief Technology Officer,
Adirondack Technologies, Inc.
Please include original message in any replies -- I get a
lot of email every day, and I have a REALLY bad memory...
So I don't always remember everything that was said.
Thanks!
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.2 for non-commercial use <http://www.pgp.com>
Comment: Please use PGP!!!
iQA/AwUBOV0KcgraVoMWBwRBEQLaTQCgizRA4kMpb1wqhtNj7mGpF4y+wb4AoPjr
8idxSTc6EQC5d9k9lqqAhhbD
=iRWv
-----END PGP SIGNATURE-----
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.