should changes of translations in django rosetta propagate automatically to frontend?

482 views Asked by At

When I make or alter translations in Rosetta in Django backend, the po and mo files get updated. However, I don't see them directly show up in the frontend.

The doc of Rosetta says:

NEW: if your webserver supports it, you can force auto-reloading of the translated catalog whenever a change was saved. See the note regarding the ROSETTA_WSGI_AUTO_RELOAD variable

So which conditions should the webserver fulfill for this to work?

2

There are 2 answers

0
welworx On BEST ANSWER

as far as i have understood you have to set up your server with wsgi (e.g. Apache mod_wsgi) to use this feature.

ROSETTA_WSGI_AUTO_RELOAD and ROSETTA_UWSGI_AUTO_RELOAD: When running WSGI daemon mode, using mod_wsgi 2.0c5 or later, this setting controls whether the contents of the gettext catalog files should be automatically reloaded by the WSGI processes each time they are modified. For performance reasons, this setting should be disabled in production environments. Default to False.

3
Subhransu Das On

You just need to add ROSETTA_WSGI_AUTO_RELOAD = True and ROSETTA_UWSGI_AUTO_RELOAD = True in your settings.py file. If you have multiple settings.py file then have add these lines for all your settings file. Example:

ROSETTA_WSGI_AUTO_RELOAD = True
ROSETTA_UWSGI_AUTO_RELOAD = True