--- id: python-i18n version: "0.3.9" license: MIT license_treatment: permissive maintenance: aging --- # python-i18n — Translation library for Python License: permissive · Maintenance: aging · Downloads: 399.3K/mo ## What it is and what it does python-i18n is a translation library that brings Rails-style internationalization to Python. It lets you manage translations for multiple languages in your application by loading them from YAML or JSON files, adding them programmatically, or both. The library handles common i18n tasks: substituting placeholders like %{name} into strings, choosing the right plural form based on a count, falling back to a default language when a translation is missing, and organizing translations into namespaces based on file and folder structure. You set a locale, add or load translations, and call i18n.t() with a key to retrieve the translated string. It supports memoization to cache translations in memory after the first load, and optional configuration to skip locale root elements in JSON files. With no external runtime dependencies, it installs cleanly and works out of the box. Use it for: - Build a web application that serves content in multiple languages by loading translations from YAML or JSON files organized by locale. - Add placeholder and pluralization support to user-facing messages (e.g., 'You have %{count} new emails'). - Integrate translations into a Python microservice that reuses i18n JSON files from another project without modifying the file structure. - Set up fallback locales so that missing translations in the user's preferred language automatically fall back to a default. - Organize translations hierarchically using directory and file namespaces to keep large translation sets manageable. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides internationalization (i18n) functionality for Python applications, enabling translation of strings into multiple languages with support for pluralization, placeholders, and fallback locales. Yes, if you need straightforward Rails-style i18n for a Python project and can accept that the package is aging (last release 2020-08-26). It has no dependencies, installs easily, carries no known vulnerabilities, and is permissively licensed. However, verify Python support matches your target version, and consider whether the lack of recent maintenance poses a risk for your use case. ## Install pip install python-i18n uv add python-i18n poetry add python-i18n ## Installing python-i18n Before you install: Low install friction with no runtime dependencies. Maintenance is aging—last release was 2020-08-26, though the repository remains active with a recent commit in 2026-01-17. License in practice: MIT license is permissive; you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: pip install python-i18n import i18n i18n.add_translation('foo', 'bar') i18n.t('foo') # bar # Or load from files: i18n.load_path.append('/path/to/translations') i18n.t('foo.hi') # Hello world ! Verify before relying: - Whether the package supports Python 3 exclusively or maintains Python 2 compatibility as classifiers suggest - Current test coverage and whether the build/coverage badges reflect the actual state of the codebase ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 399.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags python internationalization i18n, translation library python, multilingual text localization, pluralization and locale support, yaml json translation files, rails-style i18n python, localization, multilingual, translation-management [View on SkillFed](https://skillfed.io/packages/python-i18n) · [View on PyPI](https://pypi.org/project/python-i18n/)