iso639-lang is a fast, comprehensive Python library for working with ISO 639 language codes and information. It provides access to language data across ISO 639-1, -2, and -3 standards. The library is actively maintained with frequent updates, often tied to new releases of the ISO 639-3 tables by SIL, and is currently at version 2.6.3.
pip install iso639-langVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import the `Lang` class, create instances using various ISO 639 identifiers or English names, access language properties, and use the `is_language` validator. It also shows how to find a language from the pre-populated `languages` list.
Upgrade Python to 3.9 or newer. If unable, specify `iso639-lang<2.6.0` in your `requirements.txt` or `pyproject.toml`.
Initialize `Lang` with a single positional argument (e.g., `Lang('eng')`) or a single `partX` keyword argument (e.g., `Lang(part1='en')`). Do not combine multiple identifiers or use non-specific keyword arguments like `name`.Avoid using `bh` as an identifier. For specific Bihari languages, use their respective ISO 639-3 codes (e.g., `bho` for Bhojpuri, `mai` for Maithili).
For specific language lookups, prefer `Lang('your_identifier')`. Only iterate `languages` if you need to perform operations on the entire dataset or require filtering beyond direct identifier/name access.Change your import statement to `from iso639 import Lang` (or other symbols like `languages`, `is_language`).
Initialize `Lang` with only one positional argument (e.g., `Lang('eng')`) or by explicitly using a keyword argument for the specific part you're interested in (e.g., `Lang(part1='en')`).To look up by name, pass the name as a positional argument (e.g., `Lang('English')`). If you need to specify an ISO part, use `part1`, `part2b`, `part2t`, or `part3` as keyword arguments.Use specific ISO 639-3 codes for individual Bihari languages (e.g., `bho` for Bhojpuri) instead of the deprecated collective `bh` identifier.
No dependency data recorded yet.