Skip to content

Commit 8344aaf

Browse files
docs: add instructions for enabling translations via LOCALE_PATHS
1 parent 890e136 commit 8344aaf

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

docs/getting_started.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,19 @@ If you wish to use localizations/translations, simply add
106106
...
107107
]
108108
109+
Alternatively, if you do not want to add ``rest_framework_simplejwt`` to
110+
``INSTALLED_APPS``, you can enable translations by adding its locale directory to
111+
``LOCALE_PATHS`` in your ``settings.py``:
112+
113+
.. code-block:: python
114+
115+
import os
116+
from rest_framework_simplejwt import __file__ as simplejwt_file
117+
118+
LOCALE_PATHS = [
119+
os.path.join(os.path.dirname(simplejwt_file), 'locale'),
120+
]
121+
109122
110123
Usage
111124
-----

0 commit comments

Comments
 (0)