raesl.doc.locales#

Localization module.

Submodules#

Package Contents#

Classes#

Hookspecs

Functions#

_(key[, hook])

Gettext alike translation function.

list_locales()

List available locales.

register_locale([locale])

Register a locale. Existing locales are re-registered.

register_default_locale([locale])

Register default locale if no other locale is set.

Attributes#

logger

pm

hookspec

hookimpl

raesl.doc.locales.logger#
raesl.doc.locales.pm#
raesl.doc.locales.hookspec#
raesl.doc.locales.hookimpl#
class raesl.doc.locales.Hookspecs#
gettext()#

Get text translation.

raesl.doc.locales._(key: str, hook: pluggy.PluginManager = pm.hook)#

Gettext alike translation function.

raesl.doc.locales.list_locales()#

List available locales.

raesl.doc.locales.register_locale(locale: str = 'en')#

Register a locale. Existing locales are re-registered.

raesl.doc.locales.register_default_locale(locale: str = 'en')#

Register default locale if no other locale is set.