:py:mod:`raesl.doc.locales` =========================== .. py:module:: raesl.doc.locales .. autoapi-nested-parse:: Localization module. Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 en/index.rst nl/index.rst Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: raesl.doc.locales.Hookspecs Functions ~~~~~~~~~ .. autoapisummary:: raesl.doc.locales._ raesl.doc.locales.list_locales raesl.doc.locales.register_locale raesl.doc.locales.register_default_locale Attributes ~~~~~~~~~~ .. autoapisummary:: raesl.doc.locales.logger raesl.doc.locales.pm raesl.doc.locales.hookspec raesl.doc.locales.hookimpl .. py:data:: logger .. py:data:: pm .. py:data:: hookspec .. py:data:: hookimpl .. py:class:: Hookspecs .. py:method:: gettext() Get text translation. .. py:function:: _(key: str, hook: pluggy.PluginManager = pm.hook) Gettext alike translation function. .. py:function:: list_locales() List available locales. .. py:function:: register_locale(locale: str = 'en') Register a locale. Existing locales are re-registered. .. py:function:: register_default_locale(locale: str = 'en') Register default locale if no other locale is set.