pysepal.i18n.binding.catalog#
- pysepal.i18n.binding.catalog(folder, *, strict=True)[source]#
Bind a
messages/<locale>/*.jsondirectory.English is loaded and validated now, so a structural mistake fails when the application’s message module is imported rather than at the first render.
- Parameters:
folder (str | Path) – The message directory, usually
Path(__file__).parent.strict (bool) – Whether a key English does not define raises. When False, the lookup logs once and renders
MISSING_MARKERinstead.
- Returns:
The one catalogue bound to that path at that strictness.
- Raises:
CatalogError – The directory or the English catalogue is malformed.
- Return type: