Re: I18n when using standalone templates

2009-01-03 Thread Iwan Vosloo
On Sat, 2009-01-03 at 13:23 +1100, Malcolm Tredinnick wrote: > Dictionary updates are safe in Python. Oh, I see, because of the GIL... Thanks. -i --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: I18n when using standalone templates

2009-01-02 Thread Malcolm Tredinnick
On Mon, 2008-12-22 at 23:09 -0800, Iwan wrote: > Malcolm, > > On Dec 23, 2:00 am, Malcolm Tredinnick > wrote: > > You can do it this way: > > > > from django.utils import translation > > > > translation.activate(locale) > > > > where "locale" is a variable containing the name of

Re: I18n when using standalone templates

2008-12-22 Thread Iwan
Malcolm, On Dec 23, 2:00 am, Malcolm Tredinnick wrote: > You can do it this way: > >         from django.utils import translation > >         translation.activate(locale) > > where "locale" is a variable containing the name of the locale you wish > to activate. You should call that as early as p

Re: I18n when using standalone templates

2008-12-22 Thread Malcolm Tredinnick
On Mon, 2008-12-22 at 05:06 -0800, Iwan wrote: > Hi there, > > We're using Django templates on their own. Usually invoked like this > (eg): > > - > t = django.template.Template(templateSource) > c = django.template.Context({}) > > print t.ren

I18n when using standalone templates

2008-12-22 Thread Iwan
Hi there, We're using Django templates on their own. Usually invoked like this (eg): - t = django.template.Template(templateSource) c = django.template.Context({}) print t.render(c) - When