Multiple languages in django CMS

django CMS is designed to allow all content to exist in language-dependent versions. The same goes for many of its addon applications.

For example, you might have both English and French versions of an About us page. If you have an event on your site published by django CMS Events, you can have its details published in both languages.

Setting up languages

When you create an D project, you're asked to specify its languages - the languages that content on your site can exist in. This is a setting that you can alter at any time in the project's Control Panel, in its General settings.

Let's assume that your site has English and German listed in its Language setting.

When editing, you'll see both languages listed in the toolbar, under Languages. Selecting German will change the language code in the URL to de, and refresh the page showing you the German content.

Managing pages

Changes in each language must be published separately, giving you good control - you can update your English text while leaving the German untouched.

The Page list - select Pages from the Site menu in the toolbar - shows the status of each page.

The image below shows that:

  • the Home page exists in English and German, but that the English version has some unpublished changes
  • the Blog page has no unpublished changes in either language
  • the Events page so far only exists in English

You can select the status indicators for each language version to trigger publishing.

Other applications

Other applications can also support multiple languages. Typically, they will try to fall back to provide useful content by default even if the preferred language isn't available.

For example, if you have a list of news articles and visit the German version of the page, but not all articles exist in German versions, then the English versions will be listed instead (or vice versa). If you add the German version of an article, then that will be shown.

Finer control over language publishing

More complex control over language publishing is available. However, it requires a good understanding of how Django itself handles internationalisation, and also of django CMS's own language options.

Working with these in finer detail will involve editing the project's file in your Divio Cloud Local environment, and making the necessary configuration changes to other key files.

Did this answer your question?