Results 1 to 3 of 3

Thread: ISO 639-2 language codes

  1. #1
    Join Date
    Oct 2010
    Posts
    15
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default ISO 639-2 language codes

    Hey,
    Qt always surprises me - in a good way - about what it can do for me. I haven't found this one in the documentation, so maybe someone here can answer me. Does Qt provide a mapping for the three-letter ISO 639-2 language codes ("eng" = "English", etc)?

    If not, does someone know if is there a library that does provide this?

    Thanks, B

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: ISO 639-2 language codes

    Qt doesn't have this.

    You really don't need anything more than a simple map structure to implement this. Populate it with the data easily available from any of scores of websites. It's maybe 15 minutes worth of effort. Add another minute or two if you want reverse lookups, which you can derive from the initial map.

  3. #3
    Join Date
    Oct 2010
    Posts
    15
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: ISO 639-2 language codes

    Sure I can do it easily, but Qt or some other common library has it already then I'd rather use something that is well-maintained. Qt has the ISO 639 information somewhere inside, but I guess it isn't available through any class.

    In any case, I found that ICU does provide this functionality, even giving the country name in the user's locale which is a nice touch. It seems that ICU is widely deployed on Linux so that's good too.

Similar Threads

  1. Replies: 1
    Last Post: 5th November 2010, 05:22
  2. Error codes in QtXml
    By suneel1310 in forum Qt Programming
    Replies: 0
    Last Post: 7th September 2010, 08:39
  3. I need greenPhone keyboard codes
    By hgedek in forum Qt for Embedded and Mobile
    Replies: 6
    Last Post: 21st September 2007, 11:00
  4. QR codes
    By jcr in forum General Programming
    Replies: 0
    Last Post: 16th May 2006, 05:02
  5. Key codes
    By impeteperry in forum Qt Programming
    Replies: 4
    Last Post: 28th April 2006, 18:35

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.