2012-02-27 10:14:00 +01:00
|
|
|
from django.db import models
|
|
|
|
|
2012-02-27 10:22:33 +01:00
|
|
|
class Language(models.Model):
|
|
|
|
code = models.SlugField(db_index = True)
|
|
|
|
name = models.CharField(max_length = 100)
|
|
|
|
nplurals = models.SmallIntegerField(default = 0)
|
|
|
|
pluralequation = models.CharField(max_length = 255, blank = True)
|
2012-02-27 16:14:36 +01:00
|
|
|
|
|
|
|
def __unicode__(self):
|
|
|
|
return self.name
|
2012-02-29 13:46:25 +01:00
|
|
|
|
|
|
|
def get_plural_form(self):
|
|
|
|
return 'nplurals=%d; plural=%s;' % (self.nplurals, self.pluralequation)
|