PDA

View Full Version : Finding ISO 639: 3-letter codes w/JS


Quiet Storm
03-20-2003, 07:25 PM
http://wsabstract.com/script/script2/language.shtml

Anyone know how to find the "ISO 639: 3-letter codes (http://www.w3.org/WAI/ER/IG/ert/iso639.htm)", not just the "2-letter codes".

Needed in JS (no serverside, asp, etc...)

ArcticFox
12-08-2004, 02:23 AM
*Back to the Future!*
(bump)

Now I'm looking for this using JS or PHP...

:)

ArcticFox
06-22-2006, 01:57 AM
Still looking... 2 years later...

:(

jalarie
06-28-2006, 02:39 PM
Does this help?

http://www.loc.gov/standards/iso639-2/langcodes.html

ArcticFox
06-29-2006, 06:20 AM
Thank you, it does a little...


...but I still need to find a way to detect the codes using JS or PHP. I'd like to be able to use it to document.write a visitors' location and/or to use it for my visitor logs.

jalarie
06-29-2006, 12:58 PM
You may be able to get the code(s) by referencing the DOM, but I don't know the exact Javascript line(s) to do it. You will need to look for both the "lang" and the "xml:lang" items.