Behavior, Content, Money – 3 Things you should never give away for free!!!

BCmoney MobileTV

i18n Languages (HTML) Drop-Down Box

Posted by bcmoney on February 16, 2009 in HTML with 1 Comment


No Gravatar
i18n

courtesy of Flickr

Well when it comes to finding answers to coding-related issues, or finding things in general on the web, I’m usually pretty impressive at coming up with great finds of just about anything i’m looking for. If the usual Search Engines don’t work you can always try a message forum, then finally if all else fails, leave it to chance with question answering services like StackOverflow, Yahoo! Answers, Ask, Aardvark or Wolfram.

This one, however, stumped me completely!

For the life of me, I could not find an existing drop-down box that shows a *COMPLETE* Listing of i18n standards-compliant languages, with accompanying ISO Tags for the Identification of Languages in the VALUE attribute of the OPTION entries in the SELECT drop-down box.

In fact, I’m not even sure if such a thing existed before now, but I just feel like it does somewhere but frustratingly enough, I was unable to find it… So, I looked for a table showing the 2-3 letter codes per country, because I KNEW I had seen one of these before, and used one just a few months earlier for an unrelated project…

Well, long story short, after several redirections I finally found this table called the Codes for the Representation of Names of Languages and came up with the following Drop-Down box (enjoy!):

i18n code:


(In some cases there were no 2-letter ISO 639-1 Code equivalents, in which case I chose the 3-letter ISO 639-2 Code representations. In cases where there were ambiguities between the “B” (bibliographic) or “T” (terminology) representations of ISO 639-2, I always chose the T terminology value instead of simply going with the alphabetic order representation. This is because its more likely that any program which works with the ISO 639-2 standard will go with the official (T) terminology over the (B) Biblio values.

The SQL equivalent is here:
[snippet id=46093]
You could use this data to integrate with other popular services such as Facebook which maintains an XML file of supported langauges/locales. You can also update the simple 2-column i18n SQL script to combine with localization info on your own server, a topic for future discussion…

TO DO:

  • Break Apart the FRENCH-ENGLISH Billingual Drop-Down into FRENCH and ENGLISH versions
  • Implement the drop-down box dynamically in PHP by storing each entry in a Database.
    On a positive note, at least this compontent could be used in a standard web form for submitting each of them (or multiple ones at a time).

 

  1. Pasquale DohertySeptember 3, 2010 - 8:08 pm #1

    Numerous posts worthwhile reading on here and a lot of strong info. If you do by any chance happen to find the time, visit my site and scan my posts and afford me a comment.

    Reply
Leave a Reply

No trackbacks yet.

Posts with similar tags
Posts in similar categories

BC$ = Behavior, Content, Money

The goal of the BC$ project is to raise awareness and make changes with respect to the three pillars of information freedom - Behavior (pursuit of interests and passions), Content (sharing/exchanging ideas in various formats), Money (fairness and accessibility) - bringing to light the fact that:

1. We regularly hand over our browser histories, search histories and daily online activities to companies that want our money, or, to benefit from our use of their services with lucrative ad deals or sales of personal information.

2. We create and/or consume interesting content on their services, but we aren't adequately rewarded for our creative efforts or loyalty.

3. We pay money to be connected online (and possibly also over mobile), yet we lose both time and money by allowing companies to market to us with unsolicited advertisements, irrelevant product offers and unfairly structured service pricing plans.

  • Archives