django / django-localflavor

Country-specific Django helpers, formerly of contrib fame

Home Page:https://django-localflavor.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Javascript Support?

chrisspen opened this issue · comments

Is there any way to use localflavor's translations from Javascript?

If I setup the jsi18n include, per the docs like:

urlpatterns += i18n_patterns(
    path("jsi18n/", JavaScriptCatalog.as_view(), name="javascript-catalog"),
)

and then include it in my base template like:

<script type="text/javascript" src="{% url 'javascript-catalog' %}"></script>

none of localflavor's translations are included in the autogenerated i18n Javascript include.

This is intentional or am I not using the correct URL pattern?