On Wed, Aug 26, 2009 at 4:03 AM, Tomáš Drenčák<to...@drencak.com> wrote:
> I'd like to send mass email from custom command which will be called
> by cron. Problem is that each email could be in different language.
> How can I change actual language so ugettext and template rendering
> will return correct localized string?
> When I don't change anything, internationalization uses default
> langue.

django.utils.translation.activate(), passing the language code you
want to become the active translation (and its complement,
django.utils.translation.deactivate(), which takes you back to the
default).


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to