Skip to main content

language_data: a supplement to langcodes

This package is not meant to be used on its own. Please see langcodes for documentation.

language_data is a supplement to the langcodes module, for working with standardized codes for human languages. It stores the more bulky and hard-to-index data about languages, particularly what they are named in various languages.

For example, this stores the data that tell you that the code "en" means "English" in English, or that "francés" is the Spanish (es) name for French (fr).

The functions and test cases for working with this data are in langcodes, because working with the data correctly requires parsing language codes.

Data

The data included in this package is:

  • The names of various languages, in various languages
  • The estimated population that speaks each language
  • The estimated population that writes each language

These are all extracted from the Unicode CLDR data package, version 40, plus a few additional language names that fill in gaps in CLDR.

Caveats

  • The estimates for "writing population" are often overestimates, as described in the CLDR documentation on territory data. In most cases, they are derived from published data about literacy rates in the places where those languages are spoken. This doesn't take into account that many literate people around the world speak a language that isn't typically written, and write in a different language.

  • The writing systems of Chinese erase most (but not all) of the distinctions between spoken Chinese languages. You'll see separate estimates of the writing population for Cantonese, Mandarin, Wu, and so on, even though you'll likely consider these all to be zh when written.

  • CLDR doesn't have language population data for sign languages. Sign languages end up with a speaking_population() and writing_population() of 0, and I suppose that is literally true, but there's no data from which we could provide a signing_population() method.

Dependencies

language_data has a dependency on the marisa-trie package so that it can load a compact, efficient data structure for looking up language names.

Installation

language_data is usually installed as a dependency of langcodes, and doesn't make much sense without it. You can pip install language_data anyway if you want.

To install the language_data package in editable mode, run poetry install in the package root. (This is the equivalent of pip install -e ., which will hopefully become compatible again soon via PEP 660.)

Update CLDR data

  • Make sure submodules are up to date: git submodule update --init
  • Download CLDR data from https://cldr.unicode.org/index/downloads/
  • Unzip and copy supplemental/languageInfo.xml and supplemental/supplementalData.xml into language_data/data
  • cd language_data && ../.venv/bin/python build_data.py

Release files for language-data 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for language-data 1.4.0
File Size Uploaded
language_data-1.4.0.tar.gz 5.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for language-data 1.4.0
File Interpreter ABI Platform
language_data-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 MB

Release files / language_data-1.4.0.tar.gz

Download URL language_data-1.4.0.tar.gz
Size 5.3 MB
Tags Source
SHA-256 checksum
How to use checksums
800e6457e7beda781c156e02d7707e38db2ded026472e07e2c055dc8446ee574
BLAKE2b-256 checksum
How to use checksums
61502518b4d0805f4d1f10166837829ad0bd71dcee3ec33fa84aa8c0db23c13c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2025.

Transparency log

Release files / language_data-1.4.0-py3-none-any.whl

Download URL language_data-1.4.0-py3-none-any.whl
Size 5.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f741927c24ab14cbed2a57bc2bfe82b00cff266c427179597e8b14123364f084
BLAKE2b-256 checksum
How to use checksums
add168e2bcca94c9bbdc122a71e504e0b6a6c3e31541b1bad33fee0205996006
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1

2 release files

1.0.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page