In my models, I have two options…when I get to a variable that necessitates a selection menu, I can either use a new class or use “choices”…
ie.
class Title(models.Model):
title = models.CharField(max_length=4)
def __unicode__(self):
return self.title
or
LANG_CHOICES = (
('E', 'English'),
('F', 'Francais'),
)
Which method would be better for translation in my project?
I’m not quite sure if I understand your problem. But in django you can translate the whatever textstring you write in your code. You just need to wrap it in a translate function:
You need to run
django-admin.py makemessagesto get django to create a po file for you where you can do your translations. After that you need to rundjango-admin.py compilemessagesto compile it to binary.There is more info on the subject in the documentation.