$npx skillfedfor your agent

langcodes

Tools for labeling human languages with IETF language tags

Worth itPyPI LinguisticReleased Dec 202512.5M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — langcodes-3.5.1-py3-none-any.whl
v3.5.1 · released 2025-12-02 · Python >=3.9

Yes. Langcodes is a stable, actively maintained library with no dependencies, permissive licensing, and strong popularity (top 5000 on PyPI). Install it if you work with language codes, multilingual systems, or need to normalize IETF language tags. The only minor consideration is whether you also need the optional language_data supplement for localized language names.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later.
  • Installs with no runtime dependencies and low friction.
  • Active maintenance with a recent release (2025-12-02) and last commit on 2026-07-20.

License · maintenance · safety

permissive license (permissive) — Released under the MIT license (permissive), allowing free use, modification, and distribution with minimal restrictions.

last release 2025-12-02 (255 days) · last repo commit 2026-07-20 · 31 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 12,534,804 downloads/mo, #1,314 on PyPI

Verify before relying

pip install langcodes

from langcodes import standardize_tag, Language

# Standardize a tag
print(standardize_tag('eng_US'))  # 'en-US'

# Parse and inspect a language
lang = Language.get('en-Latn-US')
print(lang.language, lang.script, lang.territory)
  • Whether the optional language_data supplement (mentioned in description) is required for full functionality or only for localized language names.
  • Performance characteristics when processing large volumes of language tags.
Same gist for agents: .md · .json

What it is and what it does

Langcodes is a library for working with IETF language tags (standardized codes like 'en' for English, 'es' for Spanish, 'zh-Hans-CN' for Simplified Chinese in China). It implements BCP 47, the standard that subsumes ISO 639 and handles language variations, scripts, territories, and deprecated codes. The library solves the problem of language code equivalence: it knows that 'eng' and 'en' refer to the same language, that 'en-UK' is a misspelling that should map to 'en-GB', and that redundant script tags like 'en-Latn' can be shortened to 'en'.

The package provides two main interfaces: a `standardize_tag()` function that converts any language tag to its canonical BCP 47 form, and a `Language` class that parses tags into structured components (language, script, territory, variants, extensions, and private use codes). It validates tags against the IANA subtag registry, replacing deprecated values and handling complex substitutions like converting Serbo-Croatian to Serbian in Latin script. With no runtime dependencies and active maintenance, it's a lightweight tool for any application that needs to normalize or validate language identifiers.

Use it for

  • Normalize user-provided language preferences in web applications or APIs to canonical BCP 47 format for consistent storage and comparison.
  • Validate and correct language codes in multilingual content systems, replacing deprecated or misspelled codes with their modern equivalents.
  • Parse language tags to extract components (language, script, territory) for conditional logic in localization or content delivery pipelines.
  • Detect and handle language equivalences, such as treating 'zh-CN' and 'zh-Hans' interchangeably in Chinese text processing systems.
  • Build language selection dropdowns or autocomplete that accepts multiple input formats and normalizes them to standard codes.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Langcodes is a stable, actively maintained library with no dependencies, permissive licensing, and strong popularity (top 5000 on PyPI). Install it if you work with language codes, multilingual systems, or need to normalize IETF language tags. The only minor consideration is whether you also need the optional language_data supplement for localized language names.

Install

langcodes on PyPI

Before you install

Installs with no runtime dependencies and low friction. Active maintenance with a recent release (2025-12-02) and last commit on 2026-07-20. Supports current Python versions (3.9 through 3.13).

Requires Python 3.9 or later.

License in practice

Released under the MIT license (permissive), allowing free use, modification, and distribution with minimal restrictions.

Quickstart

pip install langcodes

from langcodes import standardize_tag, Language

# Standardize a tag
print(standardize_tag('eng_US'))  # 'en-US'

# Parse and inspect a language
lang = Language.get('en-Latn-US')
print(lang.language, lang.script, lang.territory)

Verify before relying

  • Whether the optional language_data supplement (mentioned in description) is required for full functionality or only for localized language names.
  • Performance characteristics when processing large volumes of language tags.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 255 days since the last release
Last repo commit
First released
Downloads12,534,804 / month, #1,314 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Evidence: langcodes-3.5.1-py3-none-any.whl

Tags

Capabilities
language code parsingIETF language tagsBCP 47 standardizationlanguage tag normalizationISO 639 language codeslanguage code validationmultilingual language identification
Topics
language-processinginternationalizationstandards-compliant

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “IETF language tags”

  • langcodesParses, validates, and standardizes IETF language tags (BCP 47…
  • http-sfvParses and serializes HTTP Structured Field Values according to the…
  • pysnmp-mibsProvides pre-compiled IETF and IANA MIBs as PySNMP classes for use in…

Give your agent the search over MCP, or paste the wish link into any chat.

More Linguistic packages

charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
tiktoken Worth it
PyPI · Linguistic · released May 2026

tiktoken is a fast BPE tokenizer that converts text into token sequences compatible with OpenAI models, supporting multiple encoding schemes including o200k_base and model-specific encodings.

Install it if you work with OpenAI APIs or need to understand token boundaries in GPT-family models.

permissive licensecompiled wheel · 3.9+
233.0Mdownloads / mo
chardet Worth it
PyPI · Python Modules · released Aug 2026

Detects character encoding and language in byte sequences with high accuracy, supporting 99 encodings and returning confidence scores, language tags, and MIME types.

Install it if you need to detect character encoding or language in byte data; the rewrite makes it substantially faster and more accurate than its predecessors.

0BSDpure Python · 3.10+
199.0Mdownloads / mo
text-unidecode With conditions
PyPI · Python Modules · released Aug 2019

Converts Unicode text to ASCII by transliterating non-ASCII characters into their closest ASCII equivalents, with no runtime dependencies.

However, if transliteration quality or ongoing maintenance matters, consider unidecode instead despite its GPL-only license.

GPL-2.0-or-laterpure Pythonabandoned
89.0Mdownloads / mo
lark Worth it
PyPI · Python Modules · released Oct 2025

Lark is a parsing library that builds abstract syntax trees from context-free grammars, supporting multiple parsing algorithms (Earley, LALR(1), CYK) with automatic line and column tracking.

MITpure Python · 3.8+
79.7Mdownloads / mo
tree-sitter Worth it
PyPI · Linguistic · released Jun 2026

Python bindings to the tree-sitter parsing library, enabling incremental parsing and syntax tree analysis for source code.

MITcompiled wheel · 3.10+
79.0Mdownloads / mo

See also language-data · language-tags · iso639-lang · python-iso639 · babelfish · iso-639 · rigour · stopwordsiso · fast-langdetect · isocodes