27 lines
569 B
Markdown
27 lines
569 B
Markdown
|
This is a demo project for htmx, flask and babel, so this readme contains
|
||
|
mostly random notes about its construction and maintenance.
|
||
|
|
||
|
Localization
|
||
|
============
|
||
|
|
||
|
I followed the tutorial at https://phrase.com/blog/posts/python-localization-flask-applications/
|
||
|
|
||
|
To extract messages, use
|
||
|
|
||
|
```
|
||
|
pybabel extract -F babel.cfg -o messages.pot .
|
||
|
```
|
||
|
|
||
|
The following creates a new translation file and may be a bad idea if you
|
||
|
already have one:
|
||
|
|
||
|
```
|
||
|
pybabel init -i messages.pot -d translations -l de
|
||
|
```
|
||
|
|
||
|
Compile the translation file(s):
|
||
|
|
||
|
```
|
||
|
pybabel compile -d translations
|
||
|
```
|