define as a shared function in `shared/i18n.py`