Skip to the content
Documentation

Multi-lingual objects

No ratings yet

Every object has one translation per content language it exists in, one main language, and an "always available" flag. This page describes how to create an object in a language, change its main language and its availability, and set the default availability of a class. Translating and removing translations is described in Working with translations.

Creating an object in a language

When an installation has more than one content language, creating an object (Create here, or the context menu) first opens Language selection: "Select the language in which you want to create the object". Choose the language and press OK; it becomes the object's main language. Only the languages your policies allow for content/create are offered (see Language-based permissions).

A language missing from the list:

  1. is not a content language yet: add it under Setup > Languages (Managing the translation languages);
  2. or is not offered by the siteaccess: the administration siteaccess needs [RegionalSettings] ShowUntranslatedObjects=enabled in its site.ini.append.php, which the setup wizard writes.

The Translations window

The full view of an object in the administration has a Translations window (switch it on in the view's window choices when it is hidden). It lists the existing translations with their locale, marks the Main one, and has:

  • Set main: choose another translation with the radio buttons in the Main column and press Set main. The old main language can then be removed if you wish.
  • Use the main language if there is no prioritized translation with Update: the always-available flag. A ticked object is shown in its main language on siteaccesses that list none of its languages.
  • Remove selected: removes the selected translations, except the main one.

Default availability of a class

A class has a Default object availability setting in its edit form (Setup > Classes, the class, Edit). New objects of the class are created always available when it is ticked. It is ticked, for example, for the Folder class of the shipped class packages. Changing it affects new objects only; existing objects keep their flag.

Example: articles written in English that every siteaccess should show, whatever its SiteLanguageList[]. Tick Default object availability for the Article class, and every new article is always available.

An example of availability

A folder exists only in Norwegian and is always available. It contains articles in English, French and Norwegian, none of them always available. A siteaccess that lists English and French shows the folder (in Norwegian, its main language) and, inside it, the English and French articles, but not the Norwegian ones.

More

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.