skillfed

babelfish

A module to work with countries and languages

babelfish v0.6.1 134.0K downloads/30d#11,492 on PyPI27
Permissive license BSD-3-Clause DORMANT released

What it is and what it does

BabelFish is a reference library for working with ISO-standardized country, language, and script identifiers in Python. It wraps ISO-3166 (countries), ISO-639-3 (languages), and ISO-15924 (scripts) into Python objects, allowing you to construct and query them by code, name, or other attributes. The library includes built-in converters for common alternate naming schemes (e.g., alpha2, alpha3b, opensubtitles for languages; country names for countries), making it easy to map between different coding systems without maintaining your own lookup tables.

Typical use cases include building multilingual applications, normalizing user-supplied language or country inputs, and working with subtitle or media metadata that uses non-standard language codes. The package is lightweight, has no heavy external dependencies, and works across modern Python versions.

Use it for:

  • Normalize user-supplied language codes (e.g., 'en', 'eng', 'English') into a canonical Language object for downstream processing.
  • Map between different language coding schemes (ISO-639-3, alpha2, OpenSubtitles codes) in subtitle or media applications.
  • Build locale-aware applications by looking up country and language metadata from ISO codes.
  • Validate and parse language-country pairs (e.g., Portuguese from Brazil) with script support.
  • Populate dropdown menus or search filters with standardized country and language names.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

BabelFish provides Python objects for countries, languages, and scripts based on ISO standards, with built-in converters to translate between different naming and coding schemes.

Yes, if you need a lightweight, standards-based reference for countries, languages, and scripts. The package is stable, permissively licensed, and has no security vulnerabilities. Install friction is minimal. The main caveat is dormant maintenance—827 days since last release—so if you need active support or expect frequent updates for new Python versions, verify that the current release works with your target environment before committing.

Install

babelfish on PyPI

pip

pip install babelfish

uv

uv add babelfish

poetry

poetry add babelfish

Installing babelfish

Before you install

Low install friction with only two lightweight runtime dependencies (importlib-resources and importlib-metadata). Maintenance is dormant—last release was 827 days ago and the last commit was 2025-02-09—but the package is marked Production/Stable and has no known vulnerabilities, suggesting it is feature-complete rather than abandoned.

License in practice

Licensed under BSD-3-Clause (permissive), which allows commercial and private use with minimal restrictions; you must include a copy of the license and copyright notice.

Quickstart

pip install babelfish

import babelfish
language = babelfish.Language('eng')
country = babelfish.Country('GB')
script = babelfish.Script('Hira')

Requires Python 3.8 or later (supports up to 3.12).

Verify before relying

  • Whether the package's dormant maintenance status (827 days since last release) poses a risk for future Python version compatibility or bug fixes.
  • Performance characteristics when working with large sets of language/country/script conversions.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (<4.0,>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 2 — importlib-resources, importlib-metadata
Maintenance dormant — 827 days since the last release
Last repo commit
First released
Downloads 133,968/month — #11,492 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: babelfish-0.6.1-py3-none-any.whl

Keywords: language, country, locale

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: InternationalizationTopic :: Software Development :: Libraries :: Python Modules

Tags

ISO language country script codeslanguage locale convertercountry code lookupISO-639 ISO-3166 librarymultilingual data mappinglanguage script representationlocale identifier parser
iso-standardsi18nlocale-data

More Python Modules packages