iso639-lang
A fast, comprehensive, ISO 639 library.
What it is and what it does
iso639-lang is a Python library that maps between language names and their ISO 639 standard identifiers. It loads ISO 639 reference tables (sets 1, 2, 3, and 5) into memory at import time, allowing fast lookups of language codes by name, code, or alternative name. You instantiate a Lang object with any valid identifier or name—such as 'French', 'fr', 'fre', or 'fra'—and retrieve the corresponding codes and metadata for that language across all five ISO 639 standards.
The library handles individual languages, language groups, macrolanguages, and deprecated codes. It recognizes alternative names (like 'Valencian' for Catalan), provides language type and scope information, and includes utilities like is_language() for validation and iter_langs() for iteration. It requires Python 3.9 or later and has no external dependencies.
Use it for:
- Normalize user-provided language names or codes to standard ISO 639 identifiers in multilingual applications.
- Resolve language metadata (name, type, scope) from a single code or name input for localization workflows.
- Validate whether a given string is a recognized ISO 639 language identifier without raising exceptions.
- Map between different ISO 639 standards (e.g., convert a 639-1 code to its 639-3 equivalent).
- Enumerate all languages or language groups in a standardized order for UI dropdowns or language selection menus.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Resolves ISO 639 language codes and names to their standardized identifiers across all five ISO 639 sets (639-1, 639-2/B, 639-2/T, 639-3, and 639-5).
Yes, if you need reliable ISO 639 language code resolution. The package is stable, dependency-free, and actively maintained. Aging maintenance status (last release 387 days ago) is not a blocker for a reference-data library, but verify that the bundled ISO 639 tables meet your currency requirements—the fact sheet notes they were last updated in July 2025.
Install
iso639-lang on PyPI
pip
pip install iso639-languv
uv add iso639-langpoetry
poetry add iso639-langInstalling iso639-lang
Before you install
Low friction: pure Python wheel with no runtime dependencies. Maintenance status is aging—last release was 387 days ago—but the repository remains active with recent commits and the package is marked Production/Stable.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute freely with minimal restrictions.
Quickstart
from iso639 import Lang
lg = Lang("French")
print(lg.pt1) # 'fr'
print(lg.pt3) # 'fra'
# Or use any valid identifier
lg2 = Lang("de")
print(lg2.name) # 'German'
Requires Python 3.9 or later.
Verify before relying
- Whether the in-memory mappings scale acceptably for applications loading many language instances in memory-constrained environments.
- Performance comparison claims against database-backed alternatives are not quantified in the fact sheet.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 387 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 423,257/month — #6,774 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: iso639_lang-2.6.3-py3-none-any.whl
Keywords: ISO 639, ISO 639-1, ISO 639-2, ISO 639-3, ISO 639-5, language code
Tags
More Linguistic packages
Detects and normalizes text encoding from…
permissive · top 100 on PyPI
tiktokentiktoken is a fast BPE tokenizer that converts…
permissive · top 1,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI
text-unidecodeConverts Unicode text to ASCII by…
copyleft · top 1,000 on PyPI
larkLark is a parsing library that builds abstract…
permissive · top 1,000 on PyPI
tree-sitterPython bindings to the tree-sitter parsing…
permissive · top 1,000 on PyPI
iso-639Provides a Python interface to ISO 639 language…
agpl · top 15,000 on PyPI
python-iso639Maps ISO 639 language codes (639-1, 639-2,…
permissive · top 5,000 on PyPI
langcodesParses, validates, and standardizes IETF…
permissive · top 5,000 on PyPI
isocodesisocodes provides programmatic access to ISO…
permissive · top 15,000 on PyPI
stopwordsisoProvides stopword lists for multiple languages…
permissive · top 15,000 on PyPI
pycountryProvides programmatic access to ISO standard…
copyleft · top 1,000 on PyPI
num2wordsConverts numbers to their word representations…
copyleft · top 5,000 on PyPI
weblate-language-dataProvides language definitions, plural rules,…
permissive · top 15,000 on PyPI
country_listProvides ISO 3166-1 country codes and names in…
permissive · top 15,000 on PyPI
pinyinConverts Chinese characters to pinyin…
permissive · top 15,000 on PyPI