In this recipe, we will discuss some guidelines about defining the tree structures for the pages of your website.
It is good practice to set the available languages for your website before creating the structure of your pages (although the Django CMS database structure also allows you to add new languages later). Besides LANGUAGES
, make sure that you have CMS_LANGUAGES
set in your settings. The CMS_LANGUAGES
setting defines which languages should be active for each Django site, as follows:
# conf/base.py or settings.py
# ...
from __future__ import unicode_literals
gettext = lambda s: s
LANGUAGES = (
("en", "English"),
("de", "Deutsch"),
("fr", "Français"),
("lt", "Lietuvių kalba"),
)
CMS_LANGUAGES = {
"default": {
"public": True,
"hide_untranslated": False,
"redirect_on_fallback": True,
},
1: [
{
"public": True,
"code": "en",
"hide_untranslated": False,...