Versions Compared

Key

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

...

Determining and setting the latter is fairly straightforward since the system users will usually know which locale they prefer. They can also set the locale themselves directly in the AdminCentral or they may always ask a user with superuser rights to set the preferred locale for them. To specify the language in which a public instance should send page content to a public user is To determine site locale is slightly more difficult. Public users usually access web pages as anonymous users. Magnolia then has to rely on indirect means that point to the preferred locale of public usersa public user.

Info

Please note that on this page, by site locale we mean a concrete language variant in which a web project's page can be rendered on a public user's device. In Magnolia, there are also other uses of "site", such as in Site module or website (a workspace name).

AdminCentral locale

The AdminCentral locale primarily defines the language of User interface labels that the system user wants to work with in the AdminCentral, for example the language of labels in the Action bar (English on the left, Korean on the right):

...

  • the User-Agent header
  • the Accept-Language header
  • Request-URI

User-Agent

While it may occassionally contain some locale information, for example the en_US part in 

...

The preferred locale information is communicated in the Accept-Language header.<TODO>

Accept-Language


The Public instance delivers the final page to a page visitor, and tries to deliver it in a way that fulfills the content of the HTTP request for the page. A part of the HTTP request's header defines which languages the visitor (client) is able to understand, and which locale variant of the page is preferred. The part that does this is the Accept-Language request header and may take one of the following three forms:

...

The first represents language expressed as a 2 or 3-character string, the second represents language as a full language tag, the third says "any language" (see Accept-Language and Language Tags in RFC-2616).

Request-URI


Configuring locale for a site