python-babel / babel

The official repository for Babel, the Python Internationalization Library
http://babel.pocoo.org/
BSD 3-Clause "New" or "Revised" License
1.34k stars 448 forks source link

Locales like sa_IN et.al. are missing #730

Open snoopyjc opened 4 years ago

snoopyjc commented 4 years ago

One of the standard Windows Excel locales is sa_IN, with hex code 0x044F. This raises in exception when passed to Locale.parse():

>>> Locale.parse('sa_IN')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Joe Cool\AppData\Local\Programs\Python\Python37-32\lib\site-packages\babel\core.py", line 331, in parse
    raise UnknownLocaleError(input_id)
babel.core.UnknownLocaleError: unknown locale 'sa_IN'
>>>

A complete list of missing ones are: st, ts, tn, ve, sa, syr, iu, dv, nso, ba, gn, arn, moh, oc, co, qut, prs, st_ZA, ts_ZA, tn_ZA, ve_ZA, sa_IN, syr_SY, iu_Cans_CA, dv_MV, nso_ZA, ba_RU, gn_PY, arn_CL, moh_CA, oc_FR, co_FR, qut_GT, prs_AF, qps_Ploc, qps_ploca, tn_BW, iu_Latn_CA, qps_plocm, smj_NO, smj_SE, sma_NO, sma_SE, sms_FI, en_029, sms, sma, iu_Cans, smj, iu_Latn.

Documentation: https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-LCID/%5bMS-LCID%5d-200304.docx

This document is from March 4, 2020.

snoopyjc commented 4 years ago

This document shows the one I'm referring to is Sanskrit, India: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/a29e5c28-9fb9-4c49-8e43-4b9b8e733a05 and others are listed here too.

dephiros commented 9 months ago

Ran into this issue recently but with en-ID

JanHusarcik commented 10 hours ago

Probably a similar issue with ach-Latn, aii, cfm-Latn, cnh-Latn, ctd-Latn, din, hmn, ht, ilo-Latn, kar-Mymr, kri, ksw-Mymr, mh, mnk-Arab. They can all be resolved via https://util.unicode.org/UnicodeJsps/languageid.jsp?a=ach-Latn+aii+cfm-Latn+cnh-Latn+ctd-Latn+din+hmn+ht+ilo-Latn+kar-Mymr+kri+ksw-Mymr+mh+mnk-Arab&l=en