translation.rst 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. Translation & Multi-Language Support
  2. ====================================
  3. Translate the UI
  4. ----------------
  5. CodeRed CMS provides all text throughout the UI and templates as translatable
  6. strings using Django's internationalization system (often abbreviated "i18n").
  7. To learn more about how translation works, read Wagtail's official `documentation
  8. <http://docs.wagtail.io/en/latest/advanced_topics/i18n/>`_ on the topic.
  9. Translate Page Content
  10. ----------------------
  11. Translation of model fields can be most efficiently and safely achieved via the
  12. well-known `Wagtail Model Translation <https://github.com/infoportugal/wagtail-modeltranslation>`_
  13. package.
  14. Please note that, due to CodeRed CMS architecture, some model fields are not exposed
  15. to the translation package by default, but you can expose these fields in your ``models.py``.
  16. See below how that would be done for the ``body`` field for a specific ``WebPage``
  17. model in ``website/models.py``:
  18. .. code-block:: python
  19. class WebPage(CoderedWebPage):
  20. body_content_panels = []
  21. content_panels = CodredWebPage.content_panels + [
  22. StreamFieldPanel('body'),
  23. ]
  24. Changing Language of the Admin Dashboard
  25. ----------------------------------------
  26. See Wagtail's `translation documentation <http://docs.wagtail.io/en/latest/advanced_topics/i18n/>`_,
  27. to enable a default language in the administration panel.
  28. Supported Languages
  29. -------------------
  30. CodeRed CMS is currently provided in English (US). However, it supports translation.
  31. If you use CodeRed CMS in a different language, please consider contributing
  32. your translations!