I tried to follow the guide but it\'s not clear enough.
I added this to my urls.py
urlpatterns = patterns(\'\',
(r\'^jsi18n/(?P
For others with my particular case, js messages are generated and compiled OK but not rendered in templates or pages when you use i18n language urls.
This is because javascript catalog should be added to i18n urls patterns, not to normal patterns.
urlpatterns += patterns('', (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict), )
=>
urlpatterns += i18n_patterns('', (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict), )
I don't know exactly how to solve your problem, but I can tell you, how things work for me:
The locale
folder is inside my tickets
app.
urls.py
js_info_dict = {
'domain': 'djangojs',
'packages': ('tickets',),
}
urlpatterns = patterns('',
(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
...
base.html
<script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script>
and to create message file:
python -m django-admin makemessages -d djangojs -l fr
python -m django-admin compilemessages
Hopefully you can pick something up from this.