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,
i think thats not possbile. You will have to use one of those translation modules (like code.google.com/p/django-modeltranslation) or write your own translation functions.