Skip to main content

A django model & fixture containing common languages and culture codes

Project description

django-languages-plus provides models and fixtures for working with both common languages and ‘culture codes’ or locale codes, like pt-BR.

Note that this is only a small (but popular) subset of all living languages, and is not even a comprehensive set of the ISO 639 languages. It does however include the endonym/autonym/exonym.

The Language model contains all ISO 639-1 languages and related information from

The model provides the following fields (original column name in parentheses).

  • name_en (ISO Language Name)
  • name_native (Native Name)
  • iso_639_1 (639-1)
  • iso_639_2T = (639-2/T)
  • iso_639_2B = (639-2/B)
  • iso_639_3 = (639-3)
  • family = (Language Family)
  • countries_spoken


pip install django-languages-plus


  1. Add languages_plus to your INSTALLED_APPS

  2. Migrate your database and load the language data fixture:

    python migrate
    python loaddata languages_data.json.gz
  3. In your code use:

    from languages_plus.models import Language
    lang = Language.objects.get(iso_639_1='en')

Generating Culture Codes (ex: pt_BR)

django-countries-plus( is now an explicit requirement. After installing both packages you can run the following command once to associate the two datasets and generate a list of culture codes (pt_BR for example):

from languages_plus.utils import associate_countries_and_languages



Django: Tested against the latest versions of 1.11, 2, and 3.

Running Tests

Does the code actually work?

$ poetry install
$ poetry run pytest

Or for the full tox suite:

$ poetry install
$ pip install tox
$ tox

Download files

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

Files for django-languages-plus, version 1.1.1
Filename, size File type Python version Upload date Hashes
Filename, size django_languages_plus-1.1.1-py2.py3-none-any.whl (31.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size django-languages-plus-1.1.1.tar.gz (28.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page