Hi, >We have the problem that some strings are in the JavaScript code for >the admin. That way those strings are not translateable for us with the >current situation. > >There are several ideas on how to solve this:
I actually forgot one: 5) JavaScript uses XHR to fetch stringdata from Django. That way the views can provide translations and the JavaScript doesn't need to care for actual string contents. This could even be a small library that implements the gettext and ngettext interfaces and internally uses synchronous XHR to fetch the strings. But synchronous XHR is a bit unreliable. There is the variant 5b) where all the admin code is rewritten so that string fetching can be handled asynchronously, to remove the problem of synchronous XHR. Both variants would have the benefit that the gettext code on the server can be used. Both have the problem that they are a bit complicated to create (although that's what I am currently using with my projects - variant 5b, but not using the gettext interface, but just directly asynchronous XHR). bye, Georg
