How to localize Content of a Django application

后端 未结 9 1677
暖寄归人
暖寄归人 2020-12-24 09:16

Hey, i am currently working on a django app for my studies, and came to the point of l18n. Localizing the site itself was very easy, but now i have to allow users, to transl

相关标签:
9条回答
  • 2020-12-24 10:19

    I would suggest checking out django-multilingual. It is a third party app that lets you define translation fields on your models.

    Of course, you still have to type in the actual translations, but they are stored transparently in the database (as opposed to in static PO files), which is what I believe you are asking about.

    0 讨论(0)
  • 2020-12-24 10:22

    There are two projects of note for translatable content in Django: http://code.google.com/p/django-multilingual/ http://code.google.com/p/transdb/

    0 讨论(0)
  • 2020-12-24 10:23

    Or try this:

    http://packages.python.org/django-easymode/i18n/index.html

    It stays very close to how you would normally do a django model, you just add 1 decorator above your model. It has admin support for the translated fields, including inlines and generic inlines. Almost anything you can do with regular models and admin classes you can do with the internationalized versions.

    0 讨论(0)
提交回复
热议问题