On Thu, Jun 16, 2011 at 11:16 AM, Anand Agarwal <ananda...@gmail.com> wrote: > Hi All > > Is there a way to define _ for items in python dictionary and list other > than individual items using gettext_lazy? > > eg: _(['hello', 'world']) does this work? > > or do I have to do > > [_('hello'), _('world')] > > > similarly whats the syntax for dictionary?? > > Regards > Anand >
No shortcuts. You could do [ _(f) for f in ['hello', 'world']], but then that would not mark up the strings 'hello' and 'world' for translation, so they would not be inserted into the translation category. Cheers Tom -- 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.