#17621: django.utils.translation.activate() issue
-------------------------------------+-------------------------------------
     Reporter:                       |                    Owner:  nobody
  tomasz.zawadzinski@…               |                   Status:  new
         Type:  Bug                  |                  Version:  1.3
    Component:                       |               Resolution:
  Internationalization               |             Triage Stage:
     Severity:  Normal               |  Unreviewed
     Keywords:                       |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by anonymous):

 I'm sorry, everything is fine using ugettext_lazy. I don't know if this
 problem is worth solving anymore.

 code looked like this (other strings were translated properly, these in
 templates and other helping functions):


 {{{

 from django.utils.translation import ugettext as _

 class BookingForm(forms.Form):
    name = forms.CharField(max_length=25, label=_(u'Imię'),
 error_messages={'required': _(u'Proszę wpisać imię.')})
    [...]

 def index(request, lang=''):
    if lang == 'en':
       translation.activate('en')
    elif lang == 'pl':
       translation.activate('pl')

    c = {'form': BookingForm()}
    [...]
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17621#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to