Skip to content

Commit c5fa37b

Browse files
authored
Add documentation about reloading translations
1 parent 3697e84 commit c5fa37b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/index.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,21 @@ out if a translation matched a changed key). If you have fuzzy entries,
297297
make sure to check them by hand and remove the fuzzy flag before
298298
compiling.
299299

300+
Reloading Translations
301+
----------------------
302+
303+
The compiled translations will only be loaded initially. This means you have
304+
to restart the server whenever you compile translations and want to see
305+
those changes. To automatically reload translations you can tell the reloader
306+
to watch the compiled ``.mo`` files::
307+
308+
$ flask run --extra-files app/translations/en_GB/LC_MESSAGES/messages.mo
309+
# or
310+
$ export FLASK_RUN_EXTRA_FILES=app/translations/en_GB/LC_MESSAGES/messages.mo
311+
$ flask run
312+
313+
See `reloader`_ for more details.
314+
300315
Troubleshooting
301316
---------------
302317

@@ -389,3 +404,4 @@ Low-Level API
389404
.. _babel: http://babel.edgewall.org/
390405
.. _pytz: http://pytz.sourceforge.net/
391406
.. _speaklater: http://pypi.python.org/pypi/speaklater
407+
.. _reloader: https://flask.palletsprojects.com/en/1.1.x/cli/#watch-extra-files-with-the-reloader

0 commit comments

Comments
 (0)