I18N-Module/README.md
2025-03-23 01:40:02 +03:00

25 lines
587 B
Markdown

# I18N-Module
Internationalization (i18n) module
i18n инжектися в builtins:
```python
from internationalization import I18N
I18N("localization_dir", "en")
print(i18n['key'])
print(i18n.get_phrase('key', some=123))
```
!!! luguru настроен под формат:
```python
fmt = "<green>{elapsed} -- {time:YYYY-MM-DD HH:mm:ss.SSS}</green> | <level>{level:<8}</level> | {extra[module]:^12} | {extra[prefix]:<12} | {message}"
```
Добавление в проект:
```bash
git submodule add ssh://git@git.anidev.ru:222/andiev-soft/I18N-Module src/modules/i18n
```