December 2016
Beginner to intermediate
694 pages
14h 2m
English
Adding translations to JavaScript poses some problems:
gettext implementation..po or .mo files; they need to be delivered by the server.Django provides an integrated solution for these problems: It passes the translations into JavaScript, so you can call gettext, and so on, from within JavaScript.
The main solution to these problems is the django.views.i18n.javascript_catalog() view, which sends out a JavaScript code library with functions that mimic the gettext interface, plus an array of translation strings.
Those translation ...
Read now
Unlock full access