Skip to main content

A library that normalises language codes

Project description



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: See also:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

languagecodes-1.1.1.tar.gz (157.4 kB view hashes)

Uploaded source

Built Distribution

languagecodes-1.1.1-py2.py3-none-any.whl (157.7 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page