Skip to content

Latest commit

 

History

History
29 lines (25 loc) · 765 Bytes

multilanguage.md

File metadata and controls

29 lines (25 loc) · 765 Bytes

Multilanguage

  • Multilanguage for English, German and Italian

How to use it

{% load i18n %}
  • Wrap the translatable content with {% trans "" %} tag
{% trans "CONTENT_NAME" %}
  • Make and compile messages
django-admin makemessages -l de    # for a specific language
django-admin compilemessages
  • You will notice that in root directory inside the local directory django.po file is created. Add your translated content inside the msgstr
msgid "CONTENT_NAME"
msgstr ""

Codebase: related app, model, template, js

  • Multilanguage items are rendered from
    • Templates templates/pages/i18n.html