[Fixed]-Translating text in external js file in Django

1👍

Instead of adding it to master/urls.py I added it to traxio/urls.py and I changed packages.

from django.views.i18n import javascript_catalog

js_info_dict = {
    //domain is default
    'packages': ('traxio',),
}

urlpatterns = [
    .....
    url(r'^jsi18n/$', javascript_catalog, js_info_dict, name='javascript-catalog'),
]

That did the trick.

If somebody else has the same problem hope this will help.

👤Boky

Leave a comment