Changeset 391 for python/trunk/Lib/locale.py
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Lib/locale.py
r60 r391 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. … … 342 375 encoding = '' 343 376 344 if sys.platform [:3] == "os2":377 if sys.platform.startswith("os2"): 345 378 import _locale 346 379 langname, encoding = _locale._getdefaultlocale() … … 505 538 506 539 """ Set the locale for the given category. The locale can be 507 a string, a locale tuple (language code, encoding), or None. 508 509 Locale tuples are converted to strings the locale aliasing 540 a string, an iterable of two strings (language code and encoding), 541 or None. 542 543 Iterables are converted to strings using the locale aliasing 510 544 engine. Locale strings are passed directly to the C lib. 511 545 … … 528 562 _setlocale(category, _build_localename(getdefaultlocale())) 529 563 530 if sys.platform in ('win32', 'darwin', 'mac', 'os2knix'):564 if sys.platform.startswith("win") or sys.platform.startswith("os2"): 531 565 # On Win32, this will return the ANSI code page 532 # On the Mac, it should return the system encoding;533 # it might return "ascii" instead534 566 def getpreferredencoding(do_setlocale = True): 535 567 """Return the charset that the user is likely using.""" … … 597 629 'iso8859_14': 'ISO8859-14', 598 630 'iso8859_15': 'ISO8859-15', 631 'iso8859_16': 'ISO8859-16', 599 632 'iso8859_2': 'ISO8859-2', 600 633 'iso8859_3': 'ISO8859-3', … … 610 643 'euc_jp': 'eucJP', 611 644 'euc_kr': 'eucKR', 612 'utf_8': 'UTF 8',645 'utf_8': 'UTF-8', 613 646 'koi8_r': 'KOI8-R', 614 647 'koi8_u': 'KOI8-U', … … 685 718 # updated 'sr_yu.utf8@cyrillic' -> 'sr_YU.UTF-8' to 'sr_CS.UTF-8' 686 719 # updated 'sr_yu@cyrillic' -> 'sr_YU.ISO8859-5' to 'sr_CS.ISO8859-5' 720 # 721 # AP 2010-04-12: 722 # Updated alias mapping to most recent locale.alias file 723 # from X.org distribution using makelocalealias.py. 724 # 725 # These are the differences compared to the old mapping (Python 2.6.5 726 # and older): 727 # 728 # updated 'ru' -> 'ru_RU.ISO8859-5' to 'ru_RU.UTF-8' 729 # updated 'ru_ru' -> 'ru_RU.ISO8859-5' to 'ru_RU.UTF-8' 730 # updated 'serbocroatian' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin' 731 # updated 'sh' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin' 732 # updated 'sh_yu' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin' 733 # updated 'sr' -> 'sr_CS.ISO8859-5' to 'sr_RS.UTF-8' 734 # updated 'sr@cyrillic' -> 'sr_CS.ISO8859-5' to 'sr_RS.UTF-8' 735 # updated 'sr@latn' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin' 736 # updated 'sr_cs.utf8@latn' -> 'sr_CS.UTF-8' to 'sr_RS.UTF-8@latin' 737 # updated 'sr_cs@latn' -> 'sr_CS.ISO8859-2' to 'sr_RS.UTF-8@latin' 738 # updated 'sr_yu' -> 'sr_CS.ISO8859-5' to 'sr_RS.UTF-8@latin' 739 # updated 'sr_yu.utf8@cyrillic' -> 'sr_CS.UTF-8' to 'sr_RS.UTF-8' 740 # updated 'sr_yu@cyrillic' -> 'sr_CS.ISO8859-5' to 'sr_RS.UTF-8' 741 # 687 742 688 743 locale_alias = { … … 736 791 'arabic': 'ar_AA.ISO8859-6', 737 792 'arabic.iso88596': 'ar_AA.ISO8859-6', 793 'as': 'as_IN.UTF-8', 738 794 'az': 'az_AZ.ISO8859-9E', 739 795 'az_az': 'az_AZ.ISO8859-9E', 740 796 'az_az.iso88599e': 'az_AZ.ISO8859-9E', 741 797 'be': 'be_BY.CP1251', 798 'be@latin': 'be_BY.UTF-8@latin', 742 799 'be_by': 'be_BY.CP1251', 743 800 'be_by.cp1251': 'be_BY.CP1251', 744 801 'be_by.microsoftcp1251': 'be_BY.CP1251', 802 'be_by.utf8@latin': 'be_BY.UTF-8@latin', 803 'be_by@latin': 'be_BY.UTF-8@latin', 745 804 'bg': 'bg_BG.CP1251', 746 805 'bg_bg': 'bg_BG.CP1251', … … 772 831 'c_c.c': 'C', 773 832 'ca': 'ca_ES.ISO8859-1', 833 'ca_ad': 'ca_AD.ISO8859-1', 834 'ca_ad.iso88591': 'ca_AD.ISO8859-1', 835 'ca_ad.iso885915': 'ca_AD.ISO8859-15', 836 'ca_ad.iso885915@euro': 'ca_AD.ISO8859-15', 837 'ca_ad.utf8@euro': 'ca_AD.UTF-8', 838 'ca_ad@euro': 'ca_AD.ISO8859-15', 774 839 'ca_es': 'ca_ES.ISO8859-1', 775 840 'ca_es.iso88591': 'ca_ES.ISO8859-1', … … 778 843 'ca_es.utf8@euro': 'ca_ES.UTF-8', 779 844 'ca_es@euro': 'ca_ES.ISO8859-15', 845 'ca_fr': 'ca_FR.ISO8859-1', 846 'ca_fr.iso88591': 'ca_FR.ISO8859-1', 847 'ca_fr.iso885915': 'ca_FR.ISO8859-15', 848 'ca_fr.iso885915@euro': 'ca_FR.ISO8859-15', 849 'ca_fr.utf8@euro': 'ca_FR.UTF-8', 850 'ca_fr@euro': 'ca_FR.ISO8859-15', 851 'ca_it': 'ca_IT.ISO8859-1', 852 'ca_it.iso88591': 'ca_IT.ISO8859-1', 853 'ca_it.iso885915': 'ca_IT.ISO8859-15', 854 'ca_it.iso885915@euro': 'ca_IT.ISO8859-15', 855 'ca_it.utf8@euro': 'ca_IT.UTF-8', 856 'ca_it@euro': 'ca_IT.ISO8859-15', 780 857 'catalan': 'ca_ES.ISO8859-1', 781 858 'cextend': 'en_US.ISO8859-1', … … 799 876 'czech': 'cs_CZ.ISO8859-2', 800 877 'da': 'da_DK.ISO8859-1', 878 'da.iso885915': 'da_DK.ISO8859-15', 801 879 'da_dk': 'da_DK.ISO8859-1', 802 880 'da_dk.88591': 'da_DK.ISO8859-1', … … 809 887 'dansk': 'da_DK.ISO8859-1', 810 888 'de': 'de_DE.ISO8859-1', 889 'de.iso885915': 'de_DE.ISO8859-15', 811 890 'de_at': 'de_AT.ISO8859-1', 812 891 'de_at.iso88591': 'de_AT.ISO8859-1', … … 990 1069 'fa_ir.isiri3342': 'fa_IR.ISIRI-3342', 991 1070 'fi': 'fi_FI.ISO8859-15', 1071 'fi.iso885915': 'fi_FI.ISO8859-15', 992 1072 'fi_fi': 'fi_FI.ISO8859-15', 993 1073 'fi_fi.88591': 'fi_FI.ISO8859-1', … … 1005 1085 'fo_fo@euro': 'fo_FO.ISO8859-15', 1006 1086 'fr': 'fr_FR.ISO8859-1', 1087 'fr.iso885915': 'fr_FR.ISO8859-15', 1007 1088 'fr_be': 'fr_BE.ISO8859-1', 1008 1089 'fr_be.88591': 'fr_BE.ISO8859-1', … … 1091 1172 'hi_in': 'hi_IN.ISCII-DEV', 1092 1173 'hi_in.isciidev': 'hi_IN.ISCII-DEV', 1174 'hne': 'hne_IN.UTF-8', 1093 1175 'hr': 'hr_HR.ISO8859-2', 1094 1176 'hr_hr': 'hr_HR.ISO8859-2', … … 1117 1199 'iso_8859_15': 'en_US.ISO8859-15', 1118 1200 'it': 'it_IT.ISO8859-1', 1201 'it.iso885915': 'it_IT.ISO8859-15', 1119 1202 'it_ch': 'it_CH.ISO8859-1', 1120 1203 'it_ch.iso88591': 'it_CH.ISO8859-1', … … 1148 1231 'ja_jp.jis7': 'ja_JP.JIS7', 1149 1232 'ja_jp.mscode': 'ja_JP.SJIS', 1233 'ja_jp.pck': 'ja_JP.SJIS', 1150 1234 'ja_jp.sjis': 'ja_JP.SJIS', 1151 1235 'ja_jp.ujis': 'ja_JP.eucJP', … … 1167 1251 'kl_gl@euro': 'kl_GL.ISO8859-15', 1168 1252 'km_kh': 'km_KH.UTF-8', 1253 'kn': 'kn_IN.UTF-8', 1169 1254 'kn_in': 'kn_IN.UTF-8', 1170 1255 'ko': 'ko_KR.eucKR', … … 1174 1259 'korean': 'ko_KR.eucKR', 1175 1260 'korean.euc': 'ko_KR.eucKR', 1261 'ks': 'ks_IN.UTF-8', 1262 'ks_in@devanagari': 'ks_IN@devanagari.UTF-8', 1176 1263 'kw': 'kw_GB.ISO8859-1', 1177 1264 'kw_gb': 'kw_GB.ISO8859-1', … … 1196 1283 'lv_lv.iso885913': 'lv_LV.ISO8859-13', 1197 1284 'lv_lv.iso88594': 'lv_LV.ISO8859-4', 1285 'mai': 'mai_IN.UTF-8', 1198 1286 'mi': 'mi_NZ.ISO8859-1', 1199 1287 'mi_nz': 'mi_NZ.ISO8859-1', … … 1204 1292 'mk_mk.iso88595': 'mk_MK.ISO8859-5', 1205 1293 'mk_mk.microsoftcp1251': 'mk_MK.CP1251', 1294 'ml': 'ml_IN.UTF-8', 1295 'mr': 'mr_IN.UTF-8', 1206 1296 'mr_in': 'mr_IN.UTF-8', 1207 1297 'ms': 'ms_MY.ISO8859-1', … … 1218 1308 'nb_no@euro': 'nb_NO.ISO8859-15', 1219 1309 'nl': 'nl_NL.ISO8859-1', 1310 'nl.iso885915': 'nl_NL.ISO8859-15', 1220 1311 'nl_be': 'nl_BE.ISO8859-1', 1221 1312 'nl_be.88591': 'nl_BE.ISO8859-1', … … 1244 1335 'no_no.iso88591': 'no_NO.ISO8859-1', 1245 1336 'no_no.iso885915': 'no_NO.ISO8859-15', 1337 'no_no.iso88591@bokmal': 'no_NO.ISO8859-1', 1338 'no_no.iso88591@nynorsk': 'no_NO.ISO8859-1', 1246 1339 'no_no@euro': 'no_NO.ISO8859-15', 1247 1340 'norwegian': 'no_NO.ISO8859-1', … … 1265 1358 'oc_fr.iso885915': 'oc_FR.ISO8859-15', 1266 1359 'oc_fr@euro': 'oc_FR.ISO8859-15', 1360 'or': 'or_IN.UTF-8', 1361 'pa': 'pa_IN.UTF-8', 1267 1362 'pa_in': 'pa_IN.UTF-8', 1268 1363 'pd': 'pd_US.ISO8859-1', … … 1292 1387 'pp_an.iso88591': 'pp_AN.ISO8859-1', 1293 1388 'pt': 'pt_PT.ISO8859-1', 1389 'pt.iso885915': 'pt_PT.ISO8859-15', 1294 1390 'pt_br': 'pt_BR.ISO8859-1', 1295 1391 'pt_br.88591': 'pt_BR.ISO8859-1', … … 1308 1404 'ro_ro.iso88592': 'ro_RO.ISO8859-2', 1309 1405 'romanian': 'ro_RO.ISO8859-2', 1310 'ru': 'ru_RU.ISO8859-5', 1311 'ru_ru': 'ru_RU.ISO8859-5', 1406 'ru': 'ru_RU.UTF-8', 1407 'ru.koi8r': 'ru_RU.KOI8-R', 1408 'ru_ru': 'ru_RU.UTF-8', 1312 1409 'ru_ru.cp1251': 'ru_RU.CP1251', 1313 1410 'ru_ru.iso88595': 'ru_RU.ISO8859-5', … … 1323 1420 'rw_rw': 'rw_RW.ISO8859-1', 1324 1421 'rw_rw.iso88591': 'rw_RW.ISO8859-1', 1422 'sd': 'sd_IN@devanagari.UTF-8', 1325 1423 'se_no': 'se_NO.UTF-8', 1326 'serbocroatian': 'sr_CS.ISO8859-2', 1327 'sh': 'sr_CS.ISO8859-2', 1424 'serbocroatian': 'sr_RS.UTF-8@latin', 1425 'sh': 'sr_RS.UTF-8@latin', 1426 'sh_ba.iso88592@bosnia': 'sr_CS.ISO8859-2', 1328 1427 'sh_hr': 'sh_HR.ISO8859-2', 1329 1428 'sh_hr.iso88592': 'hr_HR.ISO8859-2', 1330 1429 'sh_sp': 'sr_CS.ISO8859-2', 1331 'sh_yu': 'sr_ CS.ISO8859-2',1430 'sh_yu': 'sr_RS.UTF-8@latin', 1332 1431 'si': 'si_LK.UTF-8', 1333 1432 'si_lk': 'si_LK.UTF-8', … … 1352 1451 'sq_al': 'sq_AL.ISO8859-2', 1353 1452 'sq_al.iso88592': 'sq_AL.ISO8859-2', 1354 'sr': 'sr_CS.ISO8859-5', 1355 'sr@cyrillic': 'sr_CS.ISO8859-5', 1356 'sr@latn': 'sr_CS.ISO8859-2', 1453 'sr': 'sr_RS.UTF-8', 1454 'sr@cyrillic': 'sr_RS.UTF-8', 1455 'sr@latin': 'sr_RS.UTF-8@latin', 1456 'sr@latn': 'sr_RS.UTF-8@latin', 1457 'sr_cs': 'sr_RS.UTF-8', 1357 1458 'sr_cs.iso88592': 'sr_CS.ISO8859-2', 1358 1459 'sr_cs.iso88592@latn': 'sr_CS.ISO8859-2', 1359 1460 'sr_cs.iso88595': 'sr_CS.ISO8859-5', 1360 'sr_cs.utf8@latn': 'sr_CS.UTF-8', 1361 'sr_cs@latn': 'sr_CS.ISO8859-2', 1461 'sr_cs.utf8@latn': 'sr_RS.UTF-8@latin', 1462 'sr_cs@latn': 'sr_RS.UTF-8@latin', 1463 'sr_me': 'sr_ME.UTF-8', 1464 'sr_rs': 'sr_RS.UTF-8', 1465 'sr_rs.utf8@latn': 'sr_RS.UTF-8@latin', 1466 'sr_rs@latin': 'sr_RS.UTF-8@latin', 1467 'sr_rs@latn': 'sr_RS.UTF-8@latin', 1362 1468 'sr_sp': 'sr_CS.ISO8859-2', 1363 'sr_yu': 'sr_ CS.ISO8859-5',1469 'sr_yu': 'sr_RS.UTF-8@latin', 1364 1470 'sr_yu.cp1251@cyrillic': 'sr_CS.CP1251', 1365 1471 'sr_yu.iso88592': 'sr_CS.ISO8859-2', … … 1367 1473 'sr_yu.iso88595@cyrillic': 'sr_CS.ISO8859-5', 1368 1474 'sr_yu.microsoftcp1251@cyrillic': 'sr_CS.CP1251', 1369 'sr_yu.utf8@cyrillic': 'sr_ CS.UTF-8',1370 'sr_yu@cyrillic': 'sr_ CS.ISO8859-5',1475 'sr_yu.utf8@cyrillic': 'sr_RS.UTF-8', 1476 'sr_yu@cyrillic': 'sr_RS.UTF-8', 1371 1477 'ss': 'ss_ZA.ISO8859-1', 1372 1478 'ss_za': 'ss_ZA.ISO8859-1', … … 1376 1482 'st_za.iso88591': 'st_ZA.ISO8859-1', 1377 1483 'sv': 'sv_SE.ISO8859-1', 1484 'sv.iso885915': 'sv_SE.ISO8859-15', 1378 1485 'sv_fi': 'sv_FI.ISO8859-1', 1379 1486 'sv_fi.iso88591': 'sv_FI.ISO8859-1', … … 1393 1500 'ta_in.tscii': 'ta_IN.TSCII-0', 1394 1501 'ta_in.tscii0': 'ta_IN.TSCII-0', 1502 'te': 'te_IN.UTF-8', 1395 1503 'tg': 'tg_TJ.KOI8-C', 1396 1504 'tg_tj': 'tg_TJ.KOI8-C', … … 1468 1576 'zh_hk': 'zh_HK.big5hkscs', 1469 1577 'zh_hk.big5': 'zh_HK.big5', 1578 'zh_hk.big5hk': 'zh_HK.big5hkscs', 1470 1579 'zh_hk.big5hkscs': 'zh_HK.big5hkscs', 1471 1580 'zh_tw': 'zh_TW.big5', … … 1483 1592 # This list has been updated from 1484 1593 # http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_238z.asp 1485 # to include every locale up to Windows XP.1594 # to include every locale up to Windows Vista. 1486 1595 # 1487 1596 # NOTE: this mapping is incomplete. If your language is missing, please 1488 # submit a bug report to Python bug manager, which you can find via: 1489 # http://www.python.org/dev/ 1597 # submit a bug report to the Python bug tracker at http://bugs.python.org/ 1490 1598 # Make sure you include the missing language identifier and the suggested 1491 1599 # locale code. … … 1495 1603 0x0436: "af_ZA", # Afrikaans 1496 1604 0x041c: "sq_AL", # Albanian 1605 0x0484: "gsw_FR",# Alsatian - France 1606 0x045e: "am_ET", # Amharic - Ethiopia 1497 1607 0x0401: "ar_SA", # Arabic - Saudi Arabia 1498 1608 0x0801: "ar_IQ", # Arabic - Iraq … … 1512 1622 0x4001: "ar_QA", # Arabic - Qatar 1513 1623 0x042b: "hy_AM", # Armenian 1514 0x042c: "az_AZ", # Azeri Latin 1624 0x044d: "as_IN", # Assamese - India 1625 0x042c: "az_AZ", # Azeri - Latin 1515 1626 0x082c: "az_AZ", # Azeri - Cyrillic 1516 0x042d: "eu_ES", # Basque 1627 0x046d: "ba_RU", # Bashkir 1628 0x042d: "eu_ES", # Basque - Russia 1517 1629 0x0423: "be_BY", # Belarusian 1518 1630 0x0445: "bn_IN", # Begali 1519 0x201a: "bs_BA", # Bosnian 1520 0x141a: "bs_BA", # Bosnian - Cyrillic1631 0x201a: "bs_BA", # Bosnian - Cyrillic 1632 0x141a: "bs_BA", # Bosnian - Latin 1521 1633 0x047e: "br_FR", # Breton - France 1522 1634 0x0402: "bg_BG", # Bulgarian 1635 # 0x0455: "my_MM", # Burmese - Not supported 1523 1636 0x0403: "ca_ES", # Catalan 1524 1637 0x0004: "zh_CHS",# Chinese - Simplified … … 1529 1642 0x1404: "zh_MO", # Chinese - Macao S.A.R. 1530 1643 0x7c04: "zh_CHT",# Chinese - Traditional 1644 0x0483: "co_FR", # Corsican - France 1531 1645 0x041a: "hr_HR", # Croatian 1532 1646 0x101a: "hr_BA", # Croatian - Bosnia … … 1549 1663 0x2c09: "en_TT", # English - Trinidad 1550 1664 0x3009: "en_ZW", # English - Zimbabwe 1551 0x3409: "en_PH", # English - Phillippines 1665 0x3409: "en_PH", # English - Philippines 1666 0x4009: "en_IN", # English - India 1667 0x4409: "en_MY", # English - Malaysia 1668 0x4809: "en_IN", # English - Singapore 1552 1669 0x0425: "et_EE", # Estonian 1553 1670 0x0438: "fo_FO", # Faroese … … 1569 1686 0x1407: "de_LI", # German - Liechtenstein 1570 1687 0x0408: "el_GR", # Greek 1688 0x046f: "kl_GL", # Greenlandic - Greenland 1571 1689 0x0447: "gu_IN", # Gujarati 1690 0x0468: "ha_NG", # Hausa - Latin 1572 1691 0x040d: "he_IL", # Hebrew 1573 1692 0x0439: "hi_IN", # Hindi … … 1575 1694 0x040f: "is_IS", # Icelandic 1576 1695 0x0421: "id_ID", # Indonesian 1577 0x045d: "iu_CA", # Inuktitut 1696 0x045d: "iu_CA", # Inuktitut - Syllabics 1578 1697 0x085d: "iu_CA", # Inuktitut - Latin 1579 1698 0x083c: "ga_IE", # Irish - Ireland 1580 0x0434: "xh_ZA", # Xhosa - South Africa1581 0x0435: "zu_ZA", # Zulu1582 1699 0x0410: "it_IT", # Italian - Italy 1583 1700 0x0810: "it_CH", # Italian - Switzerland … … 1585 1702 0x044b: "kn_IN", # Kannada - India 1586 1703 0x043f: "kk_KZ", # Kazakh 1704 0x0453: "kh_KH", # Khmer - Cambodia 1705 0x0486: "qut_GT",# K'iche - Guatemala 1706 0x0487: "rw_RW", # Kinyarwanda - Rwanda 1587 1707 0x0457: "kok_IN",# Konkani 1588 1708 0x0412: "ko_KR", # Korean 1589 1709 0x0440: "ky_KG", # Kyrgyz 1710 0x0454: "lo_LA", # Lao - Lao PDR 1590 1711 0x0426: "lv_LV", # Latvian 1591 1712 0x0427: "lt_LT", # Lithuanian 1713 0x082e: "dsb_DE",# Lower Sorbian - Germany 1592 1714 0x046e: "lb_LU", # Luxembourgish 1593 0x042f: "mk_MK", # FYRO Macedonian1715 0x042f: "mk_MK", # FYROM Macedonian 1594 1716 0x043e: "ms_MY", # Malay - Malaysia 1595 0x083e: "ms_BN", # Malay - Brunei 1717 0x083e: "ms_BN", # Malay - Brunei Darussalam 1596 1718 0x044c: "ml_IN", # Malayalam - India 1597 1719 0x043a: "mt_MT", # Maltese … … 1600 1722 0x044e: "mr_IN", # Marathi 1601 1723 0x047c: "moh_CA",# Mohawk - Canada 1602 0x0450: "mn_MN", # Mongolian 1724 0x0450: "mn_MN", # Mongolian - Cyrillic 1725 0x0850: "mn_CN", # Mongolian - PRC 1603 1726 0x0461: "ne_NP", # Nepali 1604 1727 0x0414: "nb_NO", # Norwegian - Bokmal … … 1616 1739 0x0c6b: "quz_PE",# Quechua (Peru) 1617 1740 0x0418: "ro_RO", # Romanian - Romania 1618 0x0417: "rm_CH", # R aeto-Romanese1741 0x0417: "rm_CH", # Romansh 1619 1742 0x0419: "ru_RU", # Russian 1620 1743 0x243b: "smn_FI",# Sami Finland … … 1632 1755 0x081a: "sr_SP", # Serbian - Latin 1633 1756 0x181a: "sr_BA", # Serbian - Bosnia Latin 1757 0x045b: "si_LK", # Sinhala - Sri Lanka 1634 1758 0x046c: "ns_ZA", # Northern Sotho 1635 1759 0x0432: "tn_ZA", # Setswana - Southern Africa … … 1656 1780 0x4c0a: "es_NI", # Spanish - Nicaragua 1657 1781 0x500a: "es_PR", # Spanish - Puerto Rico 1782 0x540a: "es_US", # Spanish - United States 1783 # 0x0430: "", # Sutu - Not supported 1658 1784 0x0441: "sw_KE", # Swahili 1659 1785 0x041d: "sv_SE", # Swedish - Sweden 1660 1786 0x081d: "sv_FI", # Swedish - Finland 1661 1787 0x045a: "syr_SY",# Syriac 1788 0x0428: "tg_TJ", # Tajik - Cyrillic 1789 0x085f: "tmz_DZ",# Tamazight - Latin 1662 1790 0x0449: "ta_IN", # Tamil 1663 1791 0x0444: "tt_RU", # Tatar 1664 1792 0x044a: "te_IN", # Telugu 1665 1793 0x041e: "th_TH", # Thai 1794 0x0851: "bo_BT", # Tibetan - Bhutan 1795 0x0451: "bo_CN", # Tibetan - PRC 1666 1796 0x041f: "tr_TR", # Turkish 1797 0x0442: "tk_TM", # Turkmen - Cyrillic 1798 0x0480: "ug_CN", # Uighur - Arabic 1667 1799 0x0422: "uk_UA", # Ukrainian 1800 0x042e: "wen_DE",# Upper Sorbian - Germany 1668 1801 0x0420: "ur_PK", # Urdu 1669 1802 0x0820: "ur_IN", # Urdu - India … … 1672 1805 0x042a: "vi_VN", # Vietnamese 1673 1806 0x0452: "cy_GB", # Welsh 1807 0x0488: "wo_SN", # Wolof - Senegal 1808 0x0434: "xh_ZA", # Xhosa - South Africa 1809 0x0485: "sah_RU",# Yakut - Cyrillic 1810 0x0478: "ii_CN", # Yi - PRC 1811 0x046a: "yo_NG", # Yoruba - Nigeria 1812 0x0435: "zu_ZA", # Zulu 1674 1813 } 1675 1814
Note:
See TracChangeset
for help on using the changeset viewer.