Skip to content

A Python helper library to convert between ISO 639 two- and three-letter codes.

License

Notifications You must be signed in to change notification settings

alephdata/languagecodes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

languagecodes

package

This library helps to normalise the ISO 639 codes used to describe languages from two-letter codes to three letters, and vice versa.

import languagecodes

assert 'eng' == languagecodes.iso_639_alpha3('en')
assert 'eng' == languagecodes.iso_639_alpha3('ENG ')
assert 'en' == languagecodes.iso_639_alpha2('ENG ')

You can install the library from the Python package index:

pip install languagecodes

Uses data from: https://iso639-3.sil.org/ See also: https://www.loc.gov/standards/iso639-2/php/code_list.php