I use django-datatrans for catalog translation, i'ts not perfect but good enough for me.
El martes, 2 de octubre de 2012 20:09:46 UTC-5, Houmie escribió: > > Thanks Juan. > > Well that is certainly possible. But then we have also some other lookups > like the country, which is a lookup of 139 values. It would be difficult to > keep that in the model itself. ;-) > But you are right about smaller lookups. > > Regards, > Houman > > On 3 Oct 2012, at 01:57, Juan Pablo Martínez <jpm...@gmail.com<javascript:>> > wrote: > > GENDER_CHOICES = ( > ('male', _(u'Male')), > ('female', _(u'Female')), > ) > gender = models.CharField(_(u'Sex'), max_length=10, > choices=GENDER_CHOICES) > > > > On Tue, Oct 2, 2012 at 7:23 PM, Houmie <hou...@gmail.com <javascript:>>wrote: > >> Django has an excellent support for internationalization, any English >> expression within Models, Forms, View or template can easily be marked for >> translation. However I came across an interesting situation I don't know >> how to deal with. >> >> I have a Gender lookup (Male, Female). Now even if I translated the site >> into German, the Gender dropdown is still pointing to the values saved in >> database, which happens to be in English. So How am I supposed to mark the >> values in the database to be translated in PO files? >> >> class Gender(models.Model): >> gender = models.CharField(_(u'Sex'), max_length=10) >> >> >> def __unicode__(self): >> return self.gender >> class Meta: >> >> >> verbose_name = _(u'Sex') >> verbose_name_plural = _(u'Sexes') >> >> >> Many Thanks, >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/django-users/-/mLjpKAPU1NAJ. >> To post to this group, send email to django...@googlegroups.com<javascript:> >> . >> To unsubscribe from this group, send email to >> django-users...@googlegroups.com <javascript:>. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > > > -- > juanpex > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django...@googlegroups.com<javascript:> > . > To unsubscribe from this group, send email to > django-users...@googlegroups.com <javascript:>. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/3U8FtzKa9IIJ. 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.