GNU Gettext¶
- class aiogram_i18n.cores.gnu_text_core.GNUTextCore(*, path: str | Path, default_locale: str | None = None, raise_key_error: bool = False, locales_map: dict[str, str] | None = None)[source]¶
Bases:
BaseCore[GNUTranslations]- property available_locales: tuple[str, ...]¶
- default_locale: str | None¶
- find_locales() dict[str, GNUTranslations][source]¶
Load all compiled locales from path :return: dict with locales
- get_locale(locale: str | None = None) str¶
- get_translator(locale: str) Translator¶
- locales: dict[str, Translator]¶
- locales_map: dict[str, str]¶
- nget(singular: str, plural: str | None = None, n: int = 1, locale: str | None = None, /, **kwargs: Any) str[source]¶
- async shutdown() None¶
- async startup() None¶