For a multilingual project, I have a ChoiceField and want to display the choices in alphabetical order - according to the current language. Example: choices = ((1, _('Some choice')), (2, _('Another choice')), (3, _('One more choice')))
In English it should be ordered 'Another choice', 'One more choice', 'Some choice', but in another language the ordering could be different. Can I define a sort-function that is called lazily? I've looked at the lazy and allow_lazy functions of django.utils.functional, but didn't really understand how it works. I think another possibility would be to define the choices in the form's __init__ at runtime, but that doesn't seem like an elegant way to solve the problem. Any ideas?
-- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.