i18n without gettext: JSON translations with dot keys
Quieres que tu app hable español e inglés. Buscas cómo, y el ecosistema te empuja a gettext o Babel: ficheros .po , un paso de compilación a .mo , herramientas de extracción. Potente, sí. Pero para una app pequeña o mediana es un peaje que no querías pagar — solo necesitabas un t() honesto. Lo resolví tantas veces que lo empaqueté: dotkey-i18n , Python puro, sin dependencias. Tus traducciones son…
A Python library called dotkey-i18n has been created to simplify internationalization for small to medium-sized applications. It allows translations to be stored in JSON files, which can be easily edited, and supports multiple languages. The library provides features such as fallback to a default language, navigation of nested JSON keys, and interpolation of variables.
It is framework-agnostic and can be used with various frameworks such as NiceGUI, Flask, and FastAPI. The library is available on GitHub and can be installed via pip.
Written by urgent.news from Dev.to's report — not a translation of it. Machine-written — may contain errors; check the original before relying on it.