I am developping a Django 3.0 application. This application has to support two languages, French and English. I don't foresee it supporting any other language in the future.
Given that I only have two language, I want to support them directly in the models and not resort to apps that do funky things like adding them on the fly (for performance and simplicity reasons).
Now, let's say I have a model class that looks like this:
class Organization(models.Model):
name_en = models.CharField(max_length=100)
name_fr = models.CharField(max_length=100)
def __str__(self):
# how do I return the name_en or name_fr, based on active language ?
I'm guessing this might have to do with lazy_get_text, but I feel like I'm missing something.
Also, in templates, aside from blocktrans to display/format fields based on active language, is there something else I should be aware of ?