A
A
Alexander2016-04-28 14:29:07
Django
Alexander, 2016-04-28 14:29:07

How to display multilingual data from the database?

There is a table news , it has two fields short_text_ru and short_text_en .
I tried to display data in different ways, but, all to no avail.
one of my perverted ways :).

{% for new in news %}
    {{ new.name_ + language}}
{% endfor %}

Saw some packages for this but my version of django is 1.9.
I think there are a lot of ways to do this. Please let me know which methods you use.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kuts, 2016-04-28
@kentuck1213

https://github.com/edoburu/django-parler

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question