ISO 639-1 ↔ ISO 639-2 code translation.
This package may be used for translation between ISO 639-1 and ISO 639-2.
>>> from iso_639_codes import translate >>> translate("cs") 'cze' >>> translate("cze") 'cs'
Or alternative value in case that the code was not found:
>>> translate("xe", alt="alt") 'alt'
There are two dicts which you may use for translation yourself:
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.