i18nice
Translation library for Python
What it is and what it does
i18nice is a translation library for Python that brings Rails-style i18n functionality to Python applications. It allows you to store translations in YAML or JSON files, organize them by locale and namespace, and retrieve translated strings at runtime with support for dynamic placeholders and pluralization rules.
The library handles common i18n patterns: you define translations either programmatically or via files, set a current locale, and call the translation function to fetch translated strings. It supports fallback locales when a translation is missing, lazy-loads translation files to avoid unnecessary I/O, and provides configuration options for different file structures and naming conventions. With no external runtime dependencies, it is lightweight and easy to integrate into existing Python projects.
Use it for:
- Build a web application that serves content in multiple languages with locale-specific fallbacks
- Add pluralization rules to user-facing messages (e.g., 'You have 1 mail' vs. 'You have 5 mails')
- Manage translations for a CLI tool or desktop application using YAML or JSON files
- Organize translations hierarchically by feature or module using directory and file namespaces
- Store and retrieve translated strings with placeholder substitution for dynamic content
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
i18nice provides internationalization (i18n) functionality for Python applications, enabling translation of strings into multiple languages with support for placeholders, pluralization, and fallback locales.
Yes. i18nice is actively maintained, has no security vulnerabilities, installs with zero friction, and provides a complete i18n solution for Python projects. The MIT license poses no restrictions. Install it if you need multi-language support; the Rails-inspired API and file-based configuration make it straightforward to adopt.
Install
i18nice on PyPI
pip
pip install i18niceuv
uv add i18nicepoetry
poetry add i18niceInstalling i18nice
Before you install
Installation is straightforward with no runtime dependencies; the package is pure Python and installs as a wheel. Maintenance is active with recent commits and a stable release cycle.
License in practice
MIT license is permissive, allowing use in commercial and proprietary projects with minimal restrictions—only attribution is required.
Quickstart
pip install i18nice
import i18nice
i18nice.add_translation('greeting', 'Hello %{name}!')
print(i18nice.t('greeting', name='World')) # Hello World!
Verify before relying
- Whether the package supports Python 2 or only Python 3 (classifiers indicate Python 3 but requires_python is unspecified)
- Performance characteristics when handling large translation files or many locales simultaneously
- Compatibility with async/concurrent applications
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 442 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 307,351/month — #7,776 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: i18nice-0.16.0-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
python-i18nProvides internationalization (i18n)…
permissive · top 15,000 on PyPI
translationstringProvides translation string objects and…
permissive · top 5,000 on PyPI
oslo.i18noslo.i18n provides utilities for handling…
permissive · top 5,000 on PyPI
babelBabel provides internationalization (i18n) and…
permissive · top 1,000 on PyPI
flask-babelAdds internationalization (i18n) and…
permissive · top 5,000 on PyPI
zope.i18nProvides internationalization and localization…
unclear · top 15,000 on PyPI
flufl.i18nflufl.i18n provides a high-level API for…
permissive · top 15,000 on PyPI
quart_babelAdds internationalization (i18n) and…
permissive · top 15,000 on PyPI
django-statici18nCompiles Django's JavaScript…
permissive · top 15,000 on PyPI
l18nProvides lazy translations for timezone and…
permissive · top 15,000 on PyPI