Question

I'w writing a Django application, which stores data with descriptions in at least 2 languages (Russian and English).

By "data" I mean the information, which users will write (enter, edit) to and read from the application (not the UI). The application is sort of a documentation system - it contains documentation items (paragraphs), each of which has associated text in Russian, English and potentially other languages.

Is there a standard, established way to provide multi-language descriptions for data objects in Django? If yes, where is it described?

Était-ce utile?

La solution

Django's support for localization and internationalization is limited to translating text that is part of your labels and templates, formatting of dates and numbers, and more recently proper support for timezones. In addition, automatic URL prefixing of the preferred language was added in 1.4.

For storing user-entered content in multiple languages, there is no official support. However, projects like django-multilingual-model are a good step in this direction.

Autres conseils

I think what you need is Django Hvad.

https://github.com/kristianoellegaard/django-hvad

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top