skillfed

iso639-lang

A fast, comprehensive, ISO 639 library.

iso639-lang v2.6.3 423.3K downloads/30d#6,774 on PyPI47
Permissive license AGING released

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-lang

uv

uv add iso639-lang

poetry

poetry add iso639-lang

Installing 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

Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: InternationalizationTopic :: Software Development :: LocalizationTopic :: Text Processing :: Linguistic

Tags

ISO 639 language code lookupconvert language name to codelanguage identifier resolverISO language standards librarymultilingual language code mapping
language-codesiso-standardsi18n

More Linguistic packages