On May 11, 2:10 pm, Maximbo <[EMAIL PROTECTED]> wrote:
> > now i want modules to be called in russian.
>
> Are you want to translate name of module (app) or model (child of a
> models.Model class)? Is second case, you smoke a bamboo, because there
> is no way to use i18n with module names :( AFAIK
If you want to translate class names: use verbose_name and
verbose_name_plural attributes in a Meta class defined in your model
class.
For example:
class OrgUnit(models.Model):
code = models.CharField(_("code"), unique=True, maxlength=10)
name = models.CharField(_("name"), maxlength=100)
class Meta:
verbose_name = _("Organisation unit")
or
class Category(models.Model):
class Meta:
verbose_name_plural = _("Categories")
If you want to show the names of your Django apps in Russian (or any
other language), use this patch:
http://code.djangoproject.com/attachment/ticket/3591/app_labels.5.diff
Then, run make-messages.py, update the translations in the .po files,
run compile-messages.py and you should be able to show
internationalized app names and model class names.
Наилучшие пожелания (Regards),
Vinay Sajip
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---