Fluent_compile¶
- class aiogram_i18n.cores.fluent_compile_core.FluentCompileCore(path: str | Path, default_locale: str | None = None, use_isolating: bool = False, functions: dict[str, Callable[[...], Any]] | None = None, raise_key_error: bool = True, use_td: bool = True, locales_map: dict[str, str] | None = None)[source]¶
Bases:
BaseCore[FluentBundle]- property available_locales: tuple[str, ...]¶
- default_locale: str | None¶
- find_locales() dict[str, FluentBundle][source]¶
Load all compiled locales from path
- Returns:
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¶
- async shutdown() None¶
- async startup() None¶