I have this problem: when I install the language (this or en) in my django application, with this form , javascript strings are always converted in English. My base language is Italian.
This is my configuration: urls.py:
js_info_dict = {'domain': 'djangojs', 'packages': ('myproject',),}
urlpatterns + = pattern ('', (r '^ jsi18n / $', 'django.views.i18n.javascript_catalog', js_info_dict),)
I ran this command:
django-admin.py makemessages -d djangojs -l en
To create djangojs.mo/po files. I translated the line from it to en in this file. and I ran:
django-admin.py compilemessages
Now when I go to the page containing this JS:
document.write(gettext ('Questa stringa è da tradurre'));
. " ",
( "Questa stringa è da tradurre" )
js html :
< script type = "text/javascript " src=" {% url django.views.i18n.javascript_catalog%} > </ script >
? ? .