Changeset 388 for python/vendor/current/Lib/locale.py
- Timestamp:
- Mar 19, 2014, 11:11:30 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/vendor/current/Lib/locale.py
r2 r388 12 12 """ 13 13 14 import sys, encodings, encodings.aliases 14 import sys 15 import encodings 16 import encodings.aliases 17 import re 18 import operator 15 19 import functools 20 21 try: 22 _unicode = unicode 23 except NameError: 24 # If Python is built without Unicode support, the unicode type 25 # will not exist. Fake one. 26 class _unicode(object): 27 pass 16 28 17 29 # Try importing the _locale module. … … 111 123 # Iterate over grouping intervals 112 124 def _grouping_intervals(grouping): 125 last_interval = None 113 126 for interval in grouping: 114 127 # if grouping is -1, we are done … … 117 130 # 0: re-use last group ad infinitum 118 131 if interval == 0: 132 if last_interval is None: 133 raise ValueError("invalid grouping") 119 134 while True: 120 135 yield last_interval … … 129 144 if not grouping: 130 145 return (s, 0) 131 result = ""132 seps = 0133 146 if s[-1] == ' ': 134 147 stripped = s.rstrip() … … 167 180 return s[lpos:rpos+1] 168 181 182 _percent_re = re.compile(r'%(?:\((?P<key>.*?)\))?' 183 r'(?P<modifiers>[-#0-9 +*.hlL]*?)[eEfFgGdiouxXcrs%]') 184 169 185 def format(percent, value, grouping=False, monetary=False, *additional): 170 186 """Returns the locale-aware substitution of a %? specifier … … 174 190 '*' modifiers.""" 175 191 # this is only for one-percent-specifier strings and this should be checked 176 if percent[0] != '%': 177 raise ValueError("format() must be given exactly one %char " 178 "format specifier") 192 match = _percent_re.match(percent) 193 if not match or len(match.group())!= len(percent): 194 raise ValueError(("format() must be given exactly one %%char " 195 "format specifier, %s not valid") % repr(percent)) 196 return _format(percent, value, grouping, monetary, *additional) 197 198 def _format(percent, value, grouping=False, monetary=False, *additional): 179 199 if additional: 180 200 formatted = percent % ((value,) + additional) … … 200 220 return formatted 201 221 202 import re, operator203 _percent_re = re.compile(r'%(?:\((?P<key>.*?)\))?'204 r'(?P<modifiers>[-#0-9 +*.hlL]*?)[eEfFgGdiouxXcrs%]')205 206 222 def format_string(f, val, grouping=False): 207 223 """Formats a string in the same way that the % formatting would use, … … 211 227 new_f = _percent_re.sub('%s', f) 212 228 213 if isinstance(val, tuple): 214 new_val = list(val) 229 if operator.isMappingType(val): 230 new_val = [] 231 for perc in percents: 232 if perc.group()[-1]=='%': 233 new_val.append('%') 234 else: 235 new_val.append(format(perc.group(), val, grouping)) 236 else: 237 if not isinstance(val, tuple): 238 val = (val,) 239 new_val = [] 215 240 i = 0 216 241 for perc in percents: 217 starcount = perc.group('modifiers').count('*') 218 new_val[i] = format(perc.group(), new_val[i], grouping, False, *new_val[i+1:i+1+starcount]) 219 del new_val[i+1:i+1+starcount] 220 i += (1 + starcount) 221 val = tuple(new_val) 222 elif operator.isMappingType(val): 223 for perc in percents: 224 key = perc.group("key") 225 val[key] = format(perc.group(), val[key], grouping) 226 else: 227 # val is a single value 228 val = format(percents[0].group(), val, grouping) 242 if perc.group()[-1]=='%': 243 new_val.append('%') 244 else: 245 starcount = perc.group('modifiers').count('*') 246 new_val.append(_format(perc.group(), 247 val[i], 248 grouping, 249 False, 250 *val[i+1:i+1+starcount])) 251 i += (1 + starcount) 252 val = tuple(new_val) 229 253 230 254 return new_f % val … … 314 338 _setlocale = setlocale 315 339 340 # Avoid relying on the locale-dependent .lower() method 341 # (see issue #1813). 342 _ascii_lower_map = ''.join( 343 chr(x + 32 if x >= ord('A') and x <= ord('Z') else x) 344 for x in range(256) 345 ) 346 316 347 def normalize(localename): 317 348 … … 331 362 """ 332 363 # Normalize the locale name and extract the encoding 333 fullname = localename.lower() 364 if isinstance(localename, _unicode): 365 localename = localename.encode('ascii') 366 fullname = localename.translate(_ascii_lower_map) 334 367 if ':' in fullname: 335 368 # ':' is sometimes used as encoding delimiter. … … 500 533 501 534 """ Set the locale for the given category. The locale can be 502 a string, a locale tuple (language code, encoding), or None. 503 504 Locale tuples are converted to strings the locale aliasing 535 a string, an iterable of two strings (language code and encoding), 536 or None. 537 538 Iterables are converted to strings using the locale aliasing 505 539 engine. Locale strings are passed directly to the C lib. 506 540 … … 523 557 _setlocale(category, _build_localename(getdefaultlocale())) 524 558 525 if sys.platform in ('win32', 'darwin', 'mac'):559 if sys.platform.startswith("win"): 526 560 # On Win32, this will return the ANSI code page 527 # On the Mac, it should return the system encoding;528 # it might return "ascii" instead529 561 def getpreferredencoding(do_setlocale = True): 530 562 """Return the charset that the user is likely using.""" … … 592 624 'iso8859_14': 'ISO8859-14', 593 625 'iso8859_15': 'ISO8859-15', 626 'iso8859_16': 'ISO8859-16', 594 627 'iso8859_2': 'ISO8859-2', 595 628 'iso8859_3': 'ISO8859-3', … … 605 638 'euc_jp': 'eucJP', 606 639 'euc_kr': 'eucKR', 607 'utf_8': 'UTF 8',640 'utf_8': 'UTF-8', 608 641 'koi8_r': 'KOI8-R', 609 642 'koi8_u': 'KOI8-U', … … 680 713 # updated 'sr_yu.utf8@cyrillic' -> 'sr_YU.UTF-8' to 'sr_CS.UTF-8' 681 714 # updated 'sr_yu@cyrillic' -> 'sr_YU.ISO8859-5' to 'sr_CS.ISO8859-5' 715 # 716 # AP 2010-04-12: 717 # Updated alias mapping to most recent locale.alias file 718 # from X.org distribution using makelocalealias.py. 719 # 720 # These are the differences compared to the old mapping (Python 2.6.5 721 # and older): 722 # 723 # updated 'ru' -> 'ru_RU.ISO8859-5' to 'ru_RU.UTF-8' 724 # updated 'ru_ru' -> 'ru_RU.ISO8859-5' to 'ru_RU.UTF-8' 725 # updated 'serbocroatian' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin' 726 # updated 'sh' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin' 727 # updated 'sh_yu' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin' 728 # updated 'sr' -> 'sr_CS.ISO8859-5' to 'sr_RS.UTF-8' 729 # updated 'sr@cyrillic' -> 'sr_CS.ISO8859-5' to 'sr_RS.UTF-8' 730 # updated 'sr@latn' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin' 731 # updated 'sr_cs.utf8@latn' -> 'sr_CS.UTF-8' to 'sr_RS.UTF-8@latin' 732 # updated 'sr_cs@latn' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin' 733 # updated 'sr_yu' -> 'sr_CS.ISO8859-5' to 'sr_RS.UTF-8@latin' 734 # updated 'sr_yu.utf8@cyrillic' -> 'sr_CS.UTF-8' to 'sr_RS.UTF-8' 735 # updated 'sr_yu@cyrillic' -> 'sr_CS.ISO8859-5' to 'sr_RS.UTF-8' 736 # 682 737 683 738 locale_alias = { … … 731 786 'arabic': 'ar_AA.ISO8859-6', 732 787 'arabic.iso88596': 'ar_AA.ISO8859-6', 788 'as': 'as_IN.UTF-8', 733 789 'az': 'az_AZ.ISO8859-9E', 734 790 'az_az': 'az_AZ.ISO8859-9E', 735 791 'az_az.iso88599e': 'az_AZ.ISO8859-9E', 736 792 'be': 'be_BY.CP1251', 793 'be@latin': 'be_BY.UTF-8@latin', 737 794 'be_by': 'be_BY.CP1251', 738 795 'be_by.cp1251': 'be_BY.CP1251', 739 796 'be_by.microsoftcp1251': 'be_BY.CP1251', 797 'be_by.utf8@latin': 'be_BY.UTF-8@latin', 798 'be_by@latin': 'be_BY.UTF-8@latin', 740 799 'bg': 'bg_BG.CP1251', 741 800 'bg_bg': 'bg_BG.CP1251', … … 767 826 'c_c.c': 'C', 768 827 'ca': 'ca_ES.ISO8859-1', 828 'ca_ad': 'ca_AD.ISO8859-1', 829 'ca_ad.iso88591': 'ca_AD.ISO8859-1', 830 'ca_ad.iso885915': 'ca_AD.ISO8859-15', 831 'ca_ad.iso885915@euro': 'ca_AD.ISO8859-15', 832 'ca_ad.utf8@euro': 'ca_AD.UTF-8', 833 'ca_ad@euro': 'ca_AD.ISO8859-15', 769 834 'ca_es': 'ca_ES.ISO8859-1', 770 835 'ca_es.iso88591': 'ca_ES.ISO8859-1', … … 773 838 'ca_es.utf8@euro': 'ca_ES.UTF-8', 774 839 'ca_es@euro': 'ca_ES.ISO8859-15', 840 'ca_fr': 'ca_FR.ISO8859-1', 841 'ca_fr.iso88591': 'ca_FR.ISO8859-1', 842 'ca_fr.iso885915': 'ca_FR.ISO8859-15', 843 'ca_fr.iso885915@euro': 'ca_FR.ISO8859-15', 844 'ca_fr.utf8@euro': 'ca_FR.UTF-8', 845 'ca_fr@euro': 'ca_FR.ISO8859-15', 846 'ca_it': 'ca_IT.ISO8859-1', 847 'ca_it.iso88591': 'ca_IT.ISO8859-1', 848 'ca_it.iso885915': 'ca_IT.ISO8859-15', 849 'ca_it.iso885915@euro': 'ca_IT.ISO8859-15', 850 'ca_it.utf8@euro': 'ca_IT.UTF-8', 851 'ca_it@euro': 'ca_IT.ISO8859-15', 775 852 'catalan': 'ca_ES.ISO8859-1', 776 853 'cextend': 'en_US.ISO8859-1', … … 794 871 'czech': 'cs_CZ.ISO8859-2', 795 872 'da': 'da_DK.ISO8859-1', 873 'da.iso885915': 'da_DK.ISO8859-15', 796 874 'da_dk': 'da_DK.ISO8859-1', 797 875 'da_dk.88591': 'da_DK.ISO8859-1', … … 804 882 'dansk': 'da_DK.ISO8859-1', 805 883 'de': 'de_DE.ISO8859-1', 884 'de.iso885915': 'de_DE.ISO8859-15', 806 885 'de_at': 'de_AT.ISO8859-1', 807 886 'de_at.iso88591': 'de_AT.ISO8859-1', … … 985 1064 'fa_ir.isiri3342': 'fa_IR.ISIRI-3342', 986 1065 'fi': 'fi_FI.ISO8859-15', 1066 'fi.iso885915': 'fi_FI.ISO8859-15', 987 1067 'fi_fi': 'fi_FI.ISO8859-15', 988 1068 'fi_fi.88591': 'fi_FI.ISO8859-1', … … 1000 1080 'fo_fo@euro': 'fo_FO.ISO8859-15', 1001 1081 'fr': 'fr_FR.ISO8859-1', 1082 'fr.iso885915': 'fr_FR.ISO8859-15', 1002 1083 'fr_be': 'fr_BE.ISO8859-1', 1003 1084 'fr_be.88591': 'fr_BE.ISO8859-1', … … 1086 1167 'hi_in': 'hi_IN.ISCII-DEV', 1087 1168 'hi_in.isciidev': 'hi_IN.ISCII-DEV', 1169 'hne': 'hne_IN.UTF-8', 1088 1170 'hr': 'hr_HR.ISO8859-2', 1089 1171 'hr_hr': 'hr_HR.ISO8859-2', … … 1112 1194 'iso_8859_15': 'en_US.ISO8859-15', 1113 1195 'it': 'it_IT.ISO8859-1', 1196 'it.iso885915': 'it_IT.ISO8859-15', 1114 1197 'it_ch': 'it_CH.ISO8859-1', 1115 1198 'it_ch.iso88591': 'it_CH.ISO8859-1', … … 1143 1226 'ja_jp.jis7': 'ja_JP.JIS7', 1144 1227 'ja_jp.mscode': 'ja_JP.SJIS', 1228 'ja_jp.pck': 'ja_JP.SJIS', 1145 1229 'ja_jp.sjis': 'ja_JP.SJIS', 1146 1230 'ja_jp.ujis': 'ja_JP.eucJP', … … 1162 1246 'kl_gl@euro': 'kl_GL.ISO8859-15', 1163 1247 'km_kh': 'km_KH.UTF-8', 1248 'kn': 'kn_IN.UTF-8', 1164 1249 'kn_in': 'kn_IN.UTF-8', 1165 1250 'ko': 'ko_KR.eucKR', … … 1169 1254 'korean': 'ko_KR.eucKR', 1170 1255 'korean.euc': 'ko_KR.eucKR', 1256 'ks': 'ks_IN.UTF-8', 1257 'ks_in@devanagari': 'ks_IN@devanagari.UTF-8', 1171 1258 'kw': 'kw_GB.ISO8859-1', 1172 1259 'kw_gb': 'kw_GB.ISO8859-1', … … 1191 1278 'lv_lv.iso885913': 'lv_LV.ISO8859-13', 1192 1279 'lv_lv.iso88594': 'lv_LV.ISO8859-4', 1280 'mai': 'mai_IN.UTF-8', 1193 1281 'mi': 'mi_NZ.ISO8859-1', 1194 1282 'mi_nz': 'mi_NZ.ISO8859-1', … … 1199 1287 'mk_mk.iso88595': 'mk_MK.ISO8859-5', 1200 1288 'mk_mk.microsoftcp1251': 'mk_MK.CP1251', 1289 'ml': 'ml_IN.UTF-8', 1290 'mr': 'mr_IN.UTF-8', 1201 1291 'mr_in': 'mr_IN.UTF-8', 1202 1292 'ms': 'ms_MY.ISO8859-1', … … 1213 1303 'nb_no@euro': 'nb_NO.ISO8859-15', 1214 1304 'nl': 'nl_NL.ISO8859-1', 1305 'nl.iso885915': 'nl_NL.ISO8859-15', 1215 1306 'nl_be': 'nl_BE.ISO8859-1', 1216 1307 'nl_be.88591': 'nl_BE.ISO8859-1', … … 1239 1330 'no_no.iso88591': 'no_NO.ISO8859-1', 1240 1331 'no_no.iso885915': 'no_NO.ISO8859-15', 1332 'no_no.iso88591@bokmal': 'no_NO.ISO8859-1', 1333 'no_no.iso88591@nynorsk': 'no_NO.ISO8859-1', 1241 1334 'no_no@euro': 'no_NO.ISO8859-15', 1242 1335 'norwegian': 'no_NO.ISO8859-1', … … 1260 1353 'oc_fr.iso885915': 'oc_FR.ISO8859-15', 1261 1354 'oc_fr@euro': 'oc_FR.ISO8859-15', 1355 'or': 'or_IN.UTF-8', 1356 'pa': 'pa_IN.UTF-8', 1262 1357 'pa_in': 'pa_IN.UTF-8', 1263 1358 'pd': 'pd_US.ISO8859-1', … … 1287 1382 'pp_an.iso88591': 'pp_AN.ISO8859-1', 1288 1383 'pt': 'pt_PT.ISO8859-1', 1384 'pt.iso885915': 'pt_PT.ISO8859-15', 1289 1385 'pt_br': 'pt_BR.ISO8859-1', 1290 1386 'pt_br.88591': 'pt_BR.ISO8859-1', … … 1303 1399 'ro_ro.iso88592': 'ro_RO.ISO8859-2', 1304 1400 'romanian': 'ro_RO.ISO8859-2', 1305 'ru': 'ru_RU.ISO8859-5', 1306 'ru_ru': 'ru_RU.ISO8859-5', 1401 'ru': 'ru_RU.UTF-8', 1402 'ru.koi8r': 'ru_RU.KOI8-R', 1403 'ru_ru': 'ru_RU.UTF-8', 1307 1404 'ru_ru.cp1251': 'ru_RU.CP1251', 1308 1405 'ru_ru.iso88595': 'ru_RU.ISO8859-5', … … 1318 1415 'rw_rw': 'rw_RW.ISO8859-1', 1319 1416 'rw_rw.iso88591': 'rw_RW.ISO8859-1', 1417 'sd': 'sd_IN@devanagari.UTF-8', 1320 1418 'se_no': 'se_NO.UTF-8', 1321 'serbocroatian': 'sr_CS.ISO8859-2', 1322 'sh': 'sr_CS.ISO8859-2', 1419 'serbocroatian': 'sr_RS.UTF-8@latin', 1420 'sh': 'sr_RS.UTF-8@latin', 1421 'sh_ba.iso88592@bosnia': 'sr_CS.ISO8859-2', 1323 1422 'sh_hr': 'sh_HR.ISO8859-2', 1324 1423 'sh_hr.iso88592': 'hr_HR.ISO8859-2', 1325 1424 'sh_sp': 'sr_CS.ISO8859-2', 1326 'sh_yu': 'sr_ CS.ISO8859-2',1425 'sh_yu': 'sr_RS.UTF-8@latin', 1327 1426 'si': 'si_LK.UTF-8', 1328 1427 'si_lk': 'si_LK.UTF-8', … … 1347 1446 'sq_al': 'sq_AL.ISO8859-2', 1348 1447 'sq_al.iso88592': 'sq_AL.ISO8859-2', 1349 'sr': 'sr_CS.ISO8859-5', 1350 'sr@cyrillic': 'sr_CS.ISO8859-5', 1351 'sr@latn': 'sr_CS.ISO8859-2', 1448 'sr': 'sr_RS.UTF-8', 1449 'sr@cyrillic': 'sr_RS.UTF-8', 1450 'sr@latin': 'sr_RS.UTF-8@latin', 1451 'sr@latn': 'sr_RS.UTF-8@latin', 1452 'sr_cs': 'sr_RS.UTF-8', 1352 1453 'sr_cs.iso88592': 'sr_CS.ISO8859-2', 1353 1454 'sr_cs.iso88592@latn': 'sr_CS.ISO8859-2', 1354 1455 'sr_cs.iso88595': 'sr_CS.ISO8859-5', 1355 'sr_cs.utf8@latn': 'sr_CS.UTF-8', 1356 'sr_cs@latn': 'sr_CS.ISO8859-2', 1456 'sr_cs.utf8@latn': 'sr_RS.UTF-8@latin', 1457 'sr_cs@latn': 'sr_RS.UTF-8@latin', 1458 'sr_me': 'sr_ME.UTF-8', 1459 'sr_rs': 'sr_RS.UTF-8', 1460 'sr_rs.utf8@latn': 'sr_RS.UTF-8@latin', 1461 'sr_rs@latin': 'sr_RS.UTF-8@latin', 1462 'sr_rs@latn': 'sr_RS.UTF-8@latin', 1357 1463 'sr_sp': 'sr_CS.ISO8859-2', 1358 'sr_yu': 'sr_ CS.ISO8859-5',1464 'sr_yu': 'sr_RS.UTF-8@latin', 1359 1465 'sr_yu.cp1251@cyrillic': 'sr_CS.CP1251', 1360 1466 'sr_yu.iso88592': 'sr_CS.ISO8859-2', … … 1362 1468 'sr_yu.iso88595@cyrillic': 'sr_CS.ISO8859-5', 1363 1469 'sr_yu.microsoftcp1251@cyrillic': 'sr_CS.CP1251', 1364 'sr_yu.utf8@cyrillic': 'sr_ CS.UTF-8',1365 'sr_yu@cyrillic': 'sr_ CS.ISO8859-5',1470 'sr_yu.utf8@cyrillic': 'sr_RS.UTF-8', 1471 'sr_yu@cyrillic': 'sr_RS.UTF-8', 1366 1472 'ss': 'ss_ZA.ISO8859-1', 1367 1473 'ss_za': 'ss_ZA.ISO8859-1', … … 1371 1477 'st_za.iso88591': 'st_ZA.ISO8859-1', 1372 1478 'sv': 'sv_SE.ISO8859-1', 1479 'sv.iso885915': 'sv_SE.ISO8859-15', 1373 1480 'sv_fi': 'sv_FI.ISO8859-1', 1374 1481 'sv_fi.iso88591': 'sv_FI.ISO8859-1', … … 1388 1495 'ta_in.tscii': 'ta_IN.TSCII-0', 1389 1496 'ta_in.tscii0': 'ta_IN.TSCII-0', 1497 'te': 'te_IN.UTF-8', 1390 1498 'tg': 'tg_TJ.KOI8-C', 1391 1499 'tg_tj': 'tg_TJ.KOI8-C', … … 1463 1571 'zh_hk': 'zh_HK.big5hkscs', 1464 1572 'zh_hk.big5': 'zh_HK.big5', 1573 'zh_hk.big5hk': 'zh_HK.big5hkscs', 1465 1574 'zh_hk.big5hkscs': 'zh_HK.big5hkscs', 1466 1575 'zh_tw': 'zh_TW.big5', … … 1478 1587 # This list has been updated from 1479 1588 # http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_238z.asp 1480 # to include every locale up to Windows XP.1589 # to include every locale up to Windows Vista. 1481 1590 # 1482 1591 # NOTE: this mapping is incomplete. If your language is missing, please 1483 # submit a bug report to Python bug manager, which you can find via: 1484 # http://www.python.org/dev/ 1592 # submit a bug report to the Python bug tracker at http://bugs.python.org/ 1485 1593 # Make sure you include the missing language identifier and the suggested 1486 1594 # locale code. … … 1490 1598 0x0436: "af_ZA", # Afrikaans 1491 1599 0x041c: "sq_AL", # Albanian 1600 0x0484: "gsw_FR",# Alsatian - France 1601 0x045e: "am_ET", # Amharic - Ethiopia 1492 1602 0x0401: "ar_SA", # Arabic - Saudi Arabia 1493 1603 0x0801: "ar_IQ", # Arabic - Iraq … … 1507 1617 0x4001: "ar_QA", # Arabic - Qatar 1508 1618 0x042b: "hy_AM", # Armenian 1509 0x042c: "az_AZ", # Azeri Latin 1619 0x044d: "as_IN", # Assamese - India 1620 0x042c: "az_AZ", # Azeri - Latin 1510 1621 0x082c: "az_AZ", # Azeri - Cyrillic 1511 0x042d: "eu_ES", # Basque 1622 0x046d: "ba_RU", # Bashkir 1623 0x042d: "eu_ES", # Basque - Russia 1512 1624 0x0423: "be_BY", # Belarusian 1513 1625 0x0445: "bn_IN", # Begali 1514 0x201a: "bs_BA", # Bosnian 1515 0x141a: "bs_BA", # Bosnian - Cyrillic1626 0x201a: "bs_BA", # Bosnian - Cyrillic 1627 0x141a: "bs_BA", # Bosnian - Latin 1516 1628 0x047e: "br_FR", # Breton - France 1517 1629 0x0402: "bg_BG", # Bulgarian 1630 # 0x0455: "my_MM", # Burmese - Not supported 1518 1631 0x0403: "ca_ES", # Catalan 1519 1632 0x0004: "zh_CHS",# Chinese - Simplified … … 1524 1637 0x1404: "zh_MO", # Chinese - Macao S.A.R. 1525 1638 0x7c04: "zh_CHT",# Chinese - Traditional 1639 0x0483: "co_FR", # Corsican - France 1526 1640 0x041a: "hr_HR", # Croatian 1527 1641 0x101a: "hr_BA", # Croatian - Bosnia … … 1544 1658 0x2c09: "en_TT", # English - Trinidad 1545 1659 0x3009: "en_ZW", # English - Zimbabwe 1546 0x3409: "en_PH", # English - Phillippines 1660 0x3409: "en_PH", # English - Philippines 1661 0x4009: "en_IN", # English - India 1662 0x4409: "en_MY", # English - Malaysia 1663 0x4809: "en_IN", # English - Singapore 1547 1664 0x0425: "et_EE", # Estonian 1548 1665 0x0438: "fo_FO", # Faroese … … 1564 1681 0x1407: "de_LI", # German - Liechtenstein 1565 1682 0x0408: "el_GR", # Greek 1683 0x046f: "kl_GL", # Greenlandic - Greenland 1566 1684 0x0447: "gu_IN", # Gujarati 1685 0x0468: "ha_NG", # Hausa - Latin 1567 1686 0x040d: "he_IL", # Hebrew 1568 1687 0x0439: "hi_IN", # Hindi … … 1570 1689 0x040f: "is_IS", # Icelandic 1571 1690 0x0421: "id_ID", # Indonesian 1572 0x045d: "iu_CA", # Inuktitut 1691 0x045d: "iu_CA", # Inuktitut - Syllabics 1573 1692 0x085d: "iu_CA", # Inuktitut - Latin 1574 1693 0x083c: "ga_IE", # Irish - Ireland 1575 0x0434: "xh_ZA", # Xhosa - South Africa1576 0x0435: "zu_ZA", # Zulu1577 1694 0x0410: "it_IT", # Italian - Italy 1578 1695 0x0810: "it_CH", # Italian - Switzerland … … 1580 1697 0x044b: "kn_IN", # Kannada - India 1581 1698 0x043f: "kk_KZ", # Kazakh 1699 0x0453: "kh_KH", # Khmer - Cambodia 1700 0x0486: "qut_GT",# K'iche - Guatemala 1701 0x0487: "rw_RW", # Kinyarwanda - Rwanda 1582 1702 0x0457: "kok_IN",# Konkani 1583 1703 0x0412: "ko_KR", # Korean 1584 1704 0x0440: "ky_KG", # Kyrgyz 1705 0x0454: "lo_LA", # Lao - Lao PDR 1585 1706 0x0426: "lv_LV", # Latvian 1586 1707 0x0427: "lt_LT", # Lithuanian 1708 0x082e: "dsb_DE",# Lower Sorbian - Germany 1587 1709 0x046e: "lb_LU", # Luxembourgish 1588 0x042f: "mk_MK", # FYRO Macedonian1710 0x042f: "mk_MK", # FYROM Macedonian 1589 1711 0x043e: "ms_MY", # Malay - Malaysia 1590 0x083e: "ms_BN", # Malay - Brunei 1712 0x083e: "ms_BN", # Malay - Brunei Darussalam 1591 1713 0x044c: "ml_IN", # Malayalam - India 1592 1714 0x043a: "mt_MT", # Maltese … … 1595 1717 0x044e: "mr_IN", # Marathi 1596 1718 0x047c: "moh_CA",# Mohawk - Canada 1597 0x0450: "mn_MN", # Mongolian 1719 0x0450: "mn_MN", # Mongolian - Cyrillic 1720 0x0850: "mn_CN", # Mongolian - PRC 1598 1721 0x0461: "ne_NP", # Nepali 1599 1722 0x0414: "nb_NO", # Norwegian - Bokmal … … 1611 1734 0x0c6b: "quz_PE",# Quechua (Peru) 1612 1735 0x0418: "ro_RO", # Romanian - Romania 1613 0x0417: "rm_CH", # R aeto-Romanese1736 0x0417: "rm_CH", # Romansh 1614 1737 0x0419: "ru_RU", # Russian 1615 1738 0x243b: "smn_FI",# Sami Finland … … 1627 1750 0x081a: "sr_SP", # Serbian - Latin 1628 1751 0x181a: "sr_BA", # Serbian - Bosnia Latin 1752 0x045b: "si_LK", # Sinhala - Sri Lanka 1629 1753 0x046c: "ns_ZA", # Northern Sotho 1630 1754 0x0432: "tn_ZA", # Setswana - Southern Africa … … 1651 1775 0x4c0a: "es_NI", # Spanish - Nicaragua 1652 1776 0x500a: "es_PR", # Spanish - Puerto Rico 1777 0x540a: "es_US", # Spanish - United States 1778 # 0x0430: "", # Sutu - Not supported 1653 1779 0x0441: "sw_KE", # Swahili 1654 1780 0x041d: "sv_SE", # Swedish - Sweden 1655 1781 0x081d: "sv_FI", # Swedish - Finland 1656 1782 0x045a: "syr_SY",# Syriac 1783 0x0428: "tg_TJ", # Tajik - Cyrillic 1784 0x085f: "tmz_DZ",# Tamazight - Latin 1657 1785 0x0449: "ta_IN", # Tamil 1658 1786 0x0444: "tt_RU", # Tatar 1659 1787 0x044a: "te_IN", # Telugu 1660 1788 0x041e: "th_TH", # Thai 1789 0x0851: "bo_BT", # Tibetan - Bhutan 1790 0x0451: "bo_CN", # Tibetan - PRC 1661 1791 0x041f: "tr_TR", # Turkish 1792 0x0442: "tk_TM", # Turkmen - Cyrillic 1793 0x0480: "ug_CN", # Uighur - Arabic 1662 1794 0x0422: "uk_UA", # Ukrainian 1795 0x042e: "wen_DE",# Upper Sorbian - Germany 1663 1796 0x0420: "ur_PK", # Urdu 1664 1797 0x0820: "ur_IN", # Urdu - India … … 1667 1800 0x042a: "vi_VN", # Vietnamese 1668 1801 0x0452: "cy_GB", # Welsh 1802 0x0488: "wo_SN", # Wolof - Senegal 1803 0x0434: "xh_ZA", # Xhosa - South Africa 1804 0x0485: "sah_RU",# Yakut - Cyrillic 1805 0x0478: "ii_CN", # Yi - PRC 1806 0x046a: "yo_NG", # Yoruba - Nigeria 1807 0x0435: "zu_ZA", # Zulu 1669 1808 } 1670 1809
Note:
See TracChangeset
for help on using the changeset viewer.