The cms is multi-language capable. Available languages can be defined for the front- and the backend individually.

Configuration can be adjusted directly for each site/domain within multi-site support. To include languages you should use the following steps:


cms.sites = [
key: site1
hosts: ["localhost:9000", "",]
langs: {
# There should be only lang tags
# Language support separated for the both sides - frontend & backend
frontend: [de, en]
backend: [en]
logoPath: "uploads/site1.png"

Retrieving the languages

To retrieve the list of front- and backend languages:

// Get the front- or backend languages

    // Get the currently selected language

Switching the visitor's language

  • Via GET: Add ?lang=<lang-code> to the URL
  • In code (forcefully, should be used for tests only): Language.forceCurrentLanguage(<language code>);

Language selection example

@for(lang <-CMS.getConfig.backendLanguages) {
    <a href="@CMS.getConfig.backendPath()?lang=@lang">@lang.toUpperCase</a>

Hint: If you have dynamic urls that can have GET params, use @Template.addGetParm() to easily add the param to the url.