Hello,

in my design there are some models where I need to store certain fields in
different languages. I was wondering if anyone has done it before? I saw
some django modules that help do model translations but some of them did not
work properly.

Any best practices out there? below is my code

*my model.py*

    class Lookup_I18n(models.Model):
        i18n_code = models.CharField(max_length=5,
default=settings.LANGUAGE_CODE)
        value = models.CharField(max_length=300)

    class Lookup(models.Model):

        purpose = models.CharField(max_length=10)
        key = models.CharField(max_length=10)
        value_i18n = models.ForeignKey(Lookup_I18n)
        value = models.Field()

        class Meta:
            unique_together = (('purpose', 'key'),)

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

Reply via email to