Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

language

required

The minimum locale specification if the resolution of locale set under <locale-name> is enabled.

Defines the language part of the locale parameter, for example uk for Ukrainian.

For additional language codes see https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry.

country

optional

Defines the regional variant of the language parameter, for example GB for the United Kingdom.

For additinal country codes see https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry.

enabled

required

true enables the detection for the locale defined under <locale-name> .

class

required, default is info.magnolia.cms.i18n.DefaultI18nContentSupport

The class that defines the locale implementation. if the class is not specified, the locale is dependent on the setting in /server/i18n/content .

For the Accept-Language header case:

  • Javadoc resource link
    classNameinfo.magnolia.cms.i18n.RequestLocaleAwareI18nContentSupport
    renderTypeasynchronous
    Reads the locale from the Accept-Language header. This implementation does not render language specific URIs (see the classes below).

For the Request-URI case:

  • Javadoc resource link
    classNameinfo.magnolia.cms.i18n.DefaultI18nContentSupport
    renderTypeasynchronous
    This Used in the Magnolia Travel Demo, this implementation supports a language prefix like en . To resolve the node data it checks if a node data with the following pattern exists on the content node: <name>_<language> .
  • Javadoc resource link
    classNameinfo.magnolia.cms.i18n.HierarchyBasedI18nContentSupport
    renderTypeasynchronous
    Same as above but for a hierarchy structure, for example:

    Code Block
    my-website
        ├─en
        │  ├─page-1
        │  └─page-n
        ├─de
        │  ├─page-1
        │  └─page-n 
        └─de_CH
           ├─page-1
           └─page-n 

    The locale code can be at whatever position in the URI, not necessarily the first one. For example, /my-website/node-1/node-2/de/home-page.html .

enabled

required, default is false

Enables or disables the locale configuration.

defaultLocale

optional

If no locale can be determined this defaultLocale will be set. if not set, the fallbackLocale will be used.

fallbackLocale

requireddefault is en

The content is served for this locale if the content is not available for the current locale or the defaultLocale (if set).