alephdata / languagecodes

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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

License:MIT License


Languages

Language:Python 100.0%