languageUtil.py 1006 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/usr/bin/env python3
  2. #
  3. # languageUtil.py
  4. #
  5. # A dictionary to contain language names
  6. LANGNAME = {
  7. 'an': "Aragonese",
  8. 'bg': "Bulgarian",
  9. 'ca': "Catalan",
  10. 'cz': "Czech",
  11. 'da': "Danish",
  12. 'de': "German",
  13. 'el': "Greek", 'el_CY': "Greek (Cyprus)", 'el_gr': "Greek (Greece)",
  14. 'en': "English",
  15. 'es': "Spanish",
  16. 'eu': "Basque-Euskera",
  17. 'fi': "Finnish",
  18. 'fr': "French", 'fr_na': "French (no accent)",
  19. 'gl': "Galician",
  20. 'hr': "Croatian (Hrvatski)",
  21. 'hu': "Hungarian / Magyar",
  22. 'it': "Italian",
  23. 'jp_kana': "Japanese (Kana)",
  24. 'ko_KR': "Korean",
  25. 'nl': "Dutch",
  26. 'pl': "Polish",
  27. 'pt': "Portuguese", 'pt_br': "Portuguese (Brazil)",
  28. 'ro': "Romanian",
  29. 'ru': "Russian",
  30. 'sk': "Slovak",
  31. 'sv': "Swedish",
  32. 'tr': "Turkish",
  33. 'uk': "Ukrainian",
  34. 'vi': "Vietnamese",
  35. 'zh_CN': "Simplified Chinese", 'zh_TW': "Traditional Chinese"
  36. }
  37. def namebyid(id):
  38. if id in LANGNAME: return LANGNAME[id]
  39. return '<unknown>'