Hello.
I would like to get my translated text from ugettext_lazy() result.
How can I do that?

Example:
http://dpaste.com/1744/

#models.py
RATING_CHOICES = (
    ('0', _('I don\'t know')),
    ('1', _('Very bad')),
    ('2', _('Bad')),
    ('3', _('OK')),
    ('4', _('Good')),
    ('5', _('Excelent')),
)

#extra_tags.py
@register.simple_tag
def show_webstore_user_ratings(user_ratings):
    A = RATING_CHOICES[user_ratings]
    return A[1]

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