Common causes for translation problems

Did you ever make a website that uses i18n, and diligently populated your messages file, only to find that some strings just don't get translated? This page lists common causes for these kinds of problems.


In your message file, try removing the "fuzzy" line.

ForeignKey without verbose_name parameter

In your models, make sure that your ForeignKey fields get a verbose_name parameter.


    parent = models.ForeignKey('self', verbose_name=_('Parent'))

Model methods without short_description attribute

If Django is displaying the name of some model method, it should have a short_description attribute.


    def website_context(self):
        return 'bla bla'
    website_context.short_description = _('Website context')
Last modified 14 years ago Last modified on 03/25/10 12:06:13
Back to Top