Re: How to switch/force a language from inside a usual view function?

2008-07-18 Thread Valery Khamenya
Hi Malcolm, it worked out, many thanks for the great help! best regards -- Valery --~--~-~--~~~---~--~~ 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

Re: How to switch/force a language from inside a usual view function?

2008-07-17 Thread Malcolm Tredinnick
On Thu, 2008-07-17 at 08:26 -0700, Valery wrote: > Hi Malcolm, > > > It's not documented in thei18n.txt file (which needs a bit of a rewrite > > and splitting up once the docs reorganisation lands in trunk), but have > > a look at the activate() function in > > django/utils/translation/trans_rea

Re: How to switch/force a language from inside a usual view function?

2008-07-17 Thread Valery
Hi Malcolm, > It's not documented in thei18n.txt file (which needs a bit of a rewrite > and splitting up once the docs reorganisation lands in trunk), but have > a look at the activate() function in > django/utils/translation/trans_real.py. according to what is stated here: http://code.djangopro

Re: [i18n] How to switch/force a language from inside a usual view function?

2008-07-17 Thread Valery Khamenya
Hi Malcolm, thanks for your reply. Neither activate('de') nor translation.activate('de') have been accepted by Python from inside my view function -- some import needed? Anyway, both calls look for me rather like application-wide "side-effects" -- what do you think? Ideally, I'd like to apply

Re: [i18n] How to switch/force a language from inside a usual view function?

2008-07-16 Thread Malcolm Tredinnick
On Wed, 2008-07-16 at 10:27 -0700, Valery wrote: > Hi all, > > I would like to force a translation language according to URI- > parameter. Something similar is done here: > http://www.jondesign.net/articles/2006/jul/02/langue-depuis-url-django-url-locale-middleware/#thecode > > but it is done t

[i18n] How to switch/force a language from inside a usual view function?

2008-07-16 Thread Valery
Hi all, I would like to force a translation language according to URI- parameter. Something similar is done here: http://www.jondesign.net/articles/2006/jul/02/langue-depuis-url-django-url-locale-middleware/#thecode but it is done there on the middleware level. In my case a decision about langua