@@ -47,9 +47,9 @@ change some internal defaults:
47
47
This defaults to ``'UTC' `` which also is the
48
48
timezone your application must use internally.
49
49
`BABEL_TRANSLATION_DIRECTORIES ` A semi-colon (``; ``) separated string of
50
- absolute and relative (to the app root) paths
51
- to translation folders. Defaults to
52
- ``translations ``.
50
+ absolute and relative (to the ` root_path ` of
51
+ the application object) paths to translation
52
+ folders. Defaults to ``translations ``.
53
53
`BABEL_DOMAIN ` The message domain used by the application.
54
54
Defaults to ``messages ``.
55
55
=============================== =============================================
@@ -249,9 +249,8 @@ time to create a ``.pot`` file. A ``.pot`` file contains all the strings
249
249
and is the template for a ``.po `` file which contains the translated
250
250
strings. Babel can do all that for you.
251
251
252
- First of all you have to get into the folder where you have your
253
- application and create a mapping file. For typical Flask applications, this
254
- is what you want in there:
252
+ First of all you have to create a mapping file. For typical Flask applications,
253
+ this is what you want in there:
255
254
256
255
.. sourcecode :: ini
257
256
@@ -276,9 +275,10 @@ translation. For example to translate to German use this command::
276
275
277
276
$ pybabel init -i messages.pot -d translations -l de
278
277
279
- ``-d translations `` tells pybabel to store the translations in this
280
- folder. This is where Flask-Babel will look for translations. Put it
281
- next to your template folder.
278
+ ``-d translations `` tells pybabel to store the translations in a directory
279
+ called "translations". This is the default folder where Flask-Babel will look
280
+ for translations unless you changed `BABEL_TRANSLATION_DIRECTORIES ` and should
281
+ be at the root of your application.
282
282
283
283
Now edit the ``translations/de/LC_MESSAGES/messages.po `` file as needed.
284
284
Check out some gettext tutorials if you feel lost.
0 commit comments