On Dec 19, 4:07 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> Hi,
>
> > I tried calling translation.deactivate_all() and then calling
> > translation.activate(<translation language >) from my code but
> > apparently only a restart does the trick.
>
> > Does anyone know how to make Django's i18n machinery pick up new
> > translations as soon as they are generated?
>
> Try something like this. Hopefully this will clear out the global
> translations and force a reload:
>
> translation.deactivate_all()
> globals _translations
> _translations = {}
> translation.activate(<translation language >)
>
Thanks, Rajesh, but this doesn't work.
You've put me on the right track though: I just need to find a
reliable way to clear out that _translations global. With the above
code, printing out the _translations dictionary inside the activate()
method shows it to still be populated, which prevents the
translation() method from reloading the message files from disk.
James
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---