Hi guys
How enable i18n support for a Sphinx theme custom, for example sphinx_rtd_theme package?
This package is "basic" theme based built-in inside Sphinx package.
If I understand:
- Babel package is used for managment gettext format files.
- Jinja2 package is used for the HTML templates and with his i18n extension called "jinja2.ext.i18n" is needed for load the locales files created by Babel package.
Then exists any helper classes for to instances in my "sphinx_rtd_theme" package and loading my locales files translated?.
I am checking the Sphinx source code, I found that "jinja2.ext.i18n" is setting on some files:
When the "jinja2.ext.i18n" is setting you can use the "install_gettext_translations" for installs a translation globally for that environment,
Then the "template.py" and "jinja2glue.py" modules are using the implementation for "install_gettext_translations" but I don't what is the correct way for load my "locale" files.
Any idea how extends the locale files loader mechanise for "sphinx_rtd_theme" package?
In this moment, just it is loaded the locales inherit from sphinx theme called "basic" built-in the Sphinx package, then I believe the problem is Jinja2 engine don't load the my "locale" directory from my "sphinx_rtd_theme" repository forked.
--
Sincerily
Ing. Leonardo J. Caballero G.
Linux Counter ID =
https://linuxcounter.net/user/369081.html