2009/8/18 caiobos <caio...@gmail.com>: > > Hello! > My project is alredy working with i18n, but the i18n js doesnt work. > I have created my dir locale at the root of the project, have run > makemessages and it create the djangojs.po correcty. With compile > messages I get the djangojs.mo ok. > The problem is how i confgure it in URLconf, if i make: > > js_info_dict = { > 'packages': ('project',), > } > urlpatterns += patterns('', > (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', > js_info_dict), > ) > > It doesnt work, but if I do: > js_info_dict = { > 'packages': ('django.conf',), > } > > I get the traduction from the django package(but I dont want it, I > want my package). > So how i get it? How can it works with my traduction? > > Thanks a lot. > Caio > > project is the name of your project, isn't it? You have to remember to include the url for the translation javascript as <script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script>
the documentatios is well explained. On the other hand, I have experienced some problems getting the javascript keys from the templates. The workarround I have found is to have all the javascript (or nearly all) in external js files, a best practice anyway. -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---