ORIONIS API REFERENCE

THE ORIONIS API

Build with clarity.

Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.

class documentation

Wire the localization component from the application configuration.

The manager reads the app.locale, app.fallback_locale, and app.language_path settings, builds the loader, the repository, and the translator, and caches the resulting translator so a single shared instance serves the whole application.

Method __buildTranslator Build the translator from the application configuration.
Method __init__ Initialize the manager with the application container.
Method translator Return the shared translator instance, building it on demand.
Class Variable __slots__ Declare the instance attribute slots reserved by this class.
Instance Variable _app Application container providing configuration and paths.
Instance Variable _lock Lock serializing construction and publication of the translator.
Instance Variable _translator Translator used to resolve localized messages.
def __buildTranslator(self) -> ITranslator: (source)

Build the translator from the application configuration.

Returns
orionis.localization.contracts.ITranslatorTranslator bound to a fresh loader and repository.
Raises
orionis.localization.InvalidLocaleExceptionIf the configured locale or fallback locale is malformed.
def __init__(self, app: IApplication): (source)

Initialize the manager with the application container.

Parameters
app:orionis.IApplicationApplication container providing configuration and paths.
Returns
NoneNo return value.
def translator(self) -> ITranslator: (source)

Return the shared translator instance, building it on demand.

Returns
orionis.localization.contracts.ITranslatorTranslator configured from the application settings.
Raises
orionis.localization.InvalidLocaleExceptionIf the configured locale or fallback locale is malformed.
__slots__: tuple[str, ...] = (source)

Declare the instance attribute slots reserved by this class.

Application container providing configuration and paths.

Lock serializing construction and publication of the translator.

_translator: ITranslator | None = (source)

Translator used to resolve localized messages.