Written by The Jahia Team
   Estimated reading time:

About languages

You manage language settings for the current site in Administration>Sites>Languages. The right part of the panel displays languages already declared as usable on the site as well as options available for multilingual management. The left part displays languages that can be activated on the site.

admin-sites-languages.png

Options available for each language

Default language

Only one language can be defined as the default language among all declared languages.

The default language is the one where:

  • System names of content can be authored and modified. To maintain URL consistency, system names are invariable and editable in only one language.
  • Jahia will redirect visitors automatically if it doesn’t have the data necessary to serve pages in a specific language
  • Jahia will serve non-translated content if the substitution option has been activated on the current project

The default language is used by Jahia to serve content if it fails to find a language corresponding to the preferences expressed or implied by the user. Jahia seeks for this user preference through a series of tests against all user related datasets. The order of the tests is the:

  1. Language specified in the URL
  2. Language specified in the user profile (for registered users)
  3. Preferred language declared in the browser options
  4. Browser language

Mandatory language

A mandatory language means that a page or content needs to be published in this mandatory language to have the same page or content visible online in the other languages. In other words, a page published in a non-mandatory language will be not be visible online until it has also been published in all mandatory languages.

Active (Edit)

The Active (Edit) option controls whether content written in a specific language can be changed. If this option is unchecked, content in this language are safely stored, but it is no longer possible to edit content in this language.

This option is appropriate if you want to stop translating new content in a given language on your site and you are happy with the existing language, or if you want to completely disable a language (in which case this box and the next box must be checked) without removing the language altogether, and its related translated content.

At any time, you can reactivate a previously disabled language. Previously translated content will then reappear.

Active (Live)

The Active (Live) option allows you to determine whether this language is accessible by people who access the published version of your site. If this box is unchecked and even if translations exist in this language, users can not access them.

When adding a language this box is always unchecked, so you have to manually activate it at the appropriate time.

This option is especially useful to start the translation of a site in a recently added language, when the site already active in other languages. Publication in a non active live can still be performed. When the site is fully translated and published in this new language, activate the language in live so its available for your visitors.

Multilingual management

Adding languages

To add one or more languages, select or more languages (Ctrl-click) in the Available languages list, then click add admin-languages-add-button.png to move them to the right, then click Submit.

admin-languages-add.png

You will notice that some languages are listed multiple times. In fact, the list is based on local languages (language of the region). The available languages are a combination of language and region. Jahia can identify these local languages from the browser preferences and will react differently depending on the detected language (fr_CA or fr_FR for example). You might have two separate sites with different content for Canadian and French.

If you prefer to manage the French generically, choose the French language (fr). If you do not intend to handle content specific to a country or region (eg en_US or fr_FR), you should always use the generic local language for the specified language.

Contact your system administrator if you do not find the desired language in this list, as new locals can be added.

Using the default language

For intranet or extranet requirements, you may need to display content regardless of the language of the user's browser. For example, if you do not want blank pages in some languages when the site has not been fully translated or made available in all languages, you can enable the option of mixed languages (for example, use several languages when browsing).

admin-languages-default.png

If you enable the Allow to use unlisted languages option and the content object does not exist in the current language, Jahia will display the content in the default language. For example, if English is the default language and some content is not translated into French, it could then be automatically replaced by English.

This option is not recommended on sites open to the public because the result can be confusing to inexperienced users. It can be acceptable on sites such as intranets if people are aware of this choice and are therefore not likely to be confused by having content in two languages on the same page.

Allowing access even for undeclared languages

By default, Jahia serves pages in the requested language through the URL and loads the resource bundle files (translations for the static elements declared in JSP pages) of the matching language.

admin-languages-unlisted.png

If a user calls a page in an undeclared language, Jahia returns a 404 error because the page in question does not exist in this language, for example: www.partners.com/sq/home/actualites2012.html (sq = Albanian).

If you enable the Allow to use unlisted languages option, Jahia will ignore the language specification and serve the requested page in the default language of the site, loading resource bundles corresponding to the requested language -if they exist.

Important: This option should only be enabled if the previous option (replacement of untranslated content) is activated.