Defining locales for a site
Define the languages that editors should be able to choose as locales in
the site definition under
<site>/i18n/locales
.
Example: en
, de
and cs
locales in an example test
site definition.
test:
i18n:
enabled: true
class: info.magnolia.cms.i18n.DefaultI18nContentSupport
fallbackLocale: en
defaultLocale: cs
locales:
cz:
country: CZ
language: cs
enabled: true
de:
country: DE
language: de
enabled: true
Properties
Property | Description |
---|---|
|
optional, default is Enables support for localized content. Used to rewrite URIs and getting nodes based on the current language. |
|
required Class that implements info.magnolia.cms.i18n.I18nContentSupport such as:
|
|
optional, default is Content is served for the fallback locale if content is not available for the current locale. |
|
optional If no locale can be determined, the default locale will be set. If no default locale is defined, the fallback locale is used. |
|
required |
|
required Locale ID that consists of language and country such as |
|
optional Country code such as |
|
required Language code such as |
|
optional, default is Enables the locale. |
Configure locales for the fallback site
If i18n is enabled in the configuration of your content app, you need to configure locales for the fallback site or extend a site definition with locales. Then, when editing structured content, the locales of the fallback site will be used while showing the language dropdown. |