What is the set of supported languages and their language codes
See original GitHub issueI can’t find this information in the documentation.
I need to support Tagalog and Chinese Traditional, but when I include 'tl'
for Tagalog in PARLER_LANGUAGES
, I get
ImproperlyConfigured("{0}[{1}][{2}]['code'] does not exist in LANGUAGES".format(var_name, site_id, i))
After quite a bit of digging around, I discovered that 'zh-hans'
is the code for Chinese Simplified (this ought to be simple to discover), but I still don’t know what to use for Chinese Traditional.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Supported language codes - IBM
You use language codes to set the locale that is associated with the language and regional settings on the documents that are processed...
Read more >Supported languages and language codes - Amazon Translate
Supported languages and language codes ; Chinese (Traditional), zh-TW ; Croatian, hr ; Czech, cs ; Danish, da.
Read more >ISO 639-2 Language Code List - Library of Congress
ISO 639‑2 Code ISO 639‑1 Code German name of Language
aar aa Danakil‑Sprache
abk ab Abchasisch
ace Aceh‑Sprache
Read more >Supported languages
Supported languages · Arabic — ar · Catalan — ca · Chinese, simplified — zh_CN · Chinese, traditional — zh_TW · Croatian —...
Read more >ISO 639-1 Language Code List - Localizely
ISO Code Language Text Direction
aa Afar Left‑to‑Right
ab Abkhazian Left‑to‑Right
ae Avestan Left‑to‑Right
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @vdboor, thanks for the update!
this is my
LANGUAGES
insettings.py
and
PARLER_LANGUAGES
looks like this:After debugging I found that this is the Exception Django raises in our project when it doesn’t find the translation files (when clicking on the tab in django-admin) which is picked up by django-parler here
As previously mentioned I can add translations on a model with the
se
language without any problems and I can also get the values from the api, what I don’t understand is it seems like the language must be supported in Django in order to view/edit the fields in django-admin when the content of the fields are the only parts that has changed (at least in our project)I am also running into the same problem when I try to use languages that django doesn’t have translation files for.
If I add the language in
LANGUAGES
in settings I am able to save all of the translated fields of a model usingswitch_language
from a management command.I am also able to get the translated value from a DRF endpoint without problem.
But if I click on a tab of a language that django doesn’t have translation files for in django-admin I get:
And because of that I can’t edit the translations (or add new ones) in django-admin after I’ve originally imported them.