pysepal.i18n#
Message catalogues for pysepal applications.
A module binds its own directory of messages/<locale>/*.json and gets one
lookup back. There is no global registration, so pysepal’s own strings and an
application’s strings never collide.
from pathlib import Path from pysepal.i18n import catalog
messages = catalog(Path(__file__).parent)
Call messages.msg(...) for one message in the runtime scope’s locale,
which current_locale() and set_locale() read and change.
Modules
Bind a message directory, and resolve one message from it. |
|
The three ways a message lookup can fail. |
|
Turn one nested message document into flat dotted keys. |
|
Validate the named placeholders accepted in message templates. |
|
Read a |
|
The locale as a Solara reactive, isolated by Solara's kernel context. |
|
Cardinal plural categories from Babel's CLDR data. |
|
Compare translated messages with English identities and arguments. |