Annotate query set with field value
<p>Multilanguage website with translations stored in columns of one table.
Need to pass query set to template with already filtered translations.
Language variable is stored in session.</p>

<pre><code>class Item(models.Model):
    name = models.CharField(max_length=128)
    description = models.ForeignKey(Localization)

class Localization(models.Model):
    klingon = models.TextField(blank=True, null=True, verbose_name='klingon')
    english = models.TextField(blank=True, null=True, verbose_name='english')
</code></pre>

<p>Thought would be nice just to annotate the qs with the needed text, however I failed to find how to annotate with a field value. Something like </p>

<pre><code>item = Item.objects.all().annotate(text=description.klingon)
</code></pre>

<p>Another approach would be to use a template filter like </p>

<pre><code>item.description|choose_lang:request
</code></pre>

<p>but sorting the qs before the template seems neater.</p>