diff options
| author | Ben Wilkins <ben@prezola.com> | 2016-10-07 12:00:39 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-12-15 10:30:14 -0500 |
| commit | 9524fd9133e47fa90846904f81fe91c72f331e56 (patch) | |
| tree | 565fa9df13939faddcd9e359749a75c3bae849d3 | |
| parent | 412997f8baff8df934709b9520c9863d629c687f (diff) | |
Fixed #25751 -- Doc'd how to use JavaScriptCatalog with i18n_patterns().
| -rw-r--r-- | docs/topics/i18n/translation.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt index 22d3d10de3..1fa0cec547 100644 --- a/docs/topics/i18n/translation.txt +++ b/docs/topics/i18n/translation.txt @@ -1028,6 +1028,18 @@ The ``JavaScriptCatalog`` view name='javascript-catalog'), ] + If your root URLconf uses :func:`~django.conf.urls.i18n.i18n_patterns`, + ``JavaScriptCatalog`` must also be wrapped by ``i18n_patterns()`` for the + catalog to be correctly generated. + + **Example with** ``i18n_patterns()``:: + + from django.conf.urls.i18n import i18n_patterns + + urlpatterns = i18n_patterns( + url(r'^jsi18n/$', JavaScriptCatalog.as_view(), name='javascript-catalog'), + ) + The precedence of translations is such that the packages appearing later in the ``packages`` argument have higher precedence than the ones appearing at the beginning. This is important in the case of clashing translations for the same |
