Internationalization of models in Django applications

前端 未结 3 657
轻奢々
轻奢々 2021-01-20 11:32

My application will be available in two languages: english and german. The application will have a couple of XType objects with a description field. How can I translate the

3条回答
  •  难免孤独
    2021-01-20 11:53

    django-easymode includes the @i18n decorator, which may solve your case:

    At times it becomes a requirement to translate models. Django supports internationalization of static text in templates and code by means of gettext. For translation of models - dynamic data - easymode offers simple decorators to enable internationalized model fields and localized admin classes.

提交回复
热议问题