--- id: language-tags version: "1.3.1" license: MIT license_treatment: permissive maintenance: active --- # language-tags — This project is a Python version of the language-tags Javascript project. License: permissive · Maintenance: active · Downloads: 2.4M/mo ## What it is and what it does language-tags is a Python library for working with IANA language tags as defined by BCP 47 and RFC 5646. It provides validation and parsing of language tags (like 'en-US' or 'nl-Latn-BE') and lets you query the IANA language subtag registry to look up descriptions and metadata for each component. The package wraps the official IANA language subtag registry in JSON form and exposes it through a simple API. You use it when you need to validate that a language tag conforms to the standard, extract its parts (language code, script, region), or look up what a particular subtag means. It has no external runtime dependencies and is actively maintained to track changes in the IANA registry. Use it for: - Validate user-supplied language preferences in a web application before storing or processing them. - Parse a language tag like 'zh-Hans-CN' to extract the language, script, and region for localization logic. - Look up the description of a language subtag (e.g., what 'Latn' means) from the IANA registry. - Build a language selector UI that accepts only valid BCP 47 tags and rejects malformed input. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Validates and parses IANA language tags according to BCP 47 (RFC 5646) standards, allowing you to check whether a language tag is valid and extract its language, script, and region components. Yes. This is a stable, actively maintained library with no dependencies, a permissive MIT license, and low install friction. Install it if you need to validate or parse IANA language tags in your application. The only constraint is a Python 3.10+ requirement. ## Install pip install language-tags uv add language-tags poetry add language-tags ## Installing language-tags Before you install: Low install friction; pure Python wheel with no runtime dependencies. Actively maintained with recent updates for Python 3.13 and 3.14 support. License in practice: MIT license is permissive; you can use this package freely in commercial and open-source projects with minimal restrictions. Quickstart: pip install language-tags import language_tags tag = language_tags.tags.tag('en-US') print(tag.language) # Subtag object for 'en' print(tag.region) # Subtag object for 'US' Requires Python 3.10 or later (3.10–3.14 supported). Verify before relying: - Whether the IANA registry data is automatically updated or requires manual package releases to stay current. - Performance characteristics when validating large batches of language tags. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 2.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags language tag validation, BCP 47 parser, IANA language subtags, RFC 5646 language codes, language region script parsing, language-tags, bcp47, i18n [View on SkillFed](https://skillfed.io/packages/language-tags) · [View on PyPI](https://pypi.org/project/language-tags/)