ISO 639 Language Codes
python-iso639 provides a comprehensive and easy-to-use interface to ISO 639 language codes, including 639-1, 639-2, and 639-3, along with their names and associated information. It is actively maintained with frequent updates to the underlying ISO 639 data from SIL. The current version is 2026.1.31.
Warnings
- breaking The `exact` keyword argument in `Language.match` was removed and replaced with `strict_case` in version 2025.11.11. The default behavior for case-insensitivity also changed.
- gotcha The default behavior for case-insensitivity in `Language.match` has changed multiple times. In 2025.2.18, case-insensitivity became the default. In 2025.11.11, it reverted to being opt-in (`strict_case=False`).
- breaking Support for Python 3.9 was dropped in version 2025.11.11.
- breaking Support for Python 3.8 was dropped in version 2024.10.22.
Install
-
pip install python-iso639
Imports
- Language
from iso639 import Language
- languages
from iso639 import languages
Quickstart
from iso639 import Language, languages
# Query a language by its ISO 639-1 code
english_lang = Language.from_part1("en")
print(f"639-1 'en' name: {english_lang.name}")
# Query by ISO 639-3 code
japanese_lang = Language.from_part3("jpn")
print(f"639-3 'jpn' name: {japanese_lang.name}")
# Get all languages
print(f"Total languages in database: {len(languages)}")
# Search languages by name (case-insensitive, strict_case=False)
spanish_languages = languages.match("Spanish", strict_case=False)
print("Matching 'Spanish' (case-insensitive):")
for lang in spanish_languages:
print(f"- {lang.name} ({lang.part1 if lang.part1 else lang.part3})")