[Answered ]-How use gettext in JS code correctly?

2👍

Do you have <script src="/jsi18n/"></script> added in your base.html before your js script?

0👍

try to make the following order in your urls.py

urlpatterns = [

 # Internationalization in Javascript Code
    url(r'^jsi18n/$',
    javascript_catalog,
    js_info_dict,
    name='javascript-catalog'),

# then the other urls
   [OTHER URLs]
]

basically, make the javascript_catalog first .

Or

  • Change your system language settings, and see if it works . That means your langa\uage isn’t supported yet

Leave a comment