Language Labels
- Matthew Wagner
- Ralph (Unlicensed)
- Jacqueline Nanne
Expand the section below that corresponds to your version of XperienCentral.
In the Language Labels panel, you manage the labels for all the available languages in XperienCentral. This includes labels that appear in content elements and all informational and error messages. You can also add new languages and set the default content language.
See also Working with Language Versions in XperienCentral for general information about maintaining multiple language versions of a channel.
To access the Language Labels panel, navigate to Configuration > Language Labels:
In This Topic
Labels
On the "Labels" tab you manage the default and custom language labels for XperienCentral.
Adding a Custom Language Label
To add a custom language label, follow these steps:
- Select the language to which you want to add a custom label from the "Select language" drop-down list.
- Click [New label].
- Enter the internal name for the new label in the "Label name" field. The name should be lowercase and multiple words joined by the underscore character ( _ ) — "download_version" for example. See the format of the default labels for other examples.
- Enter the string that appears in the XperienCentral GUI in the "Value" field.
Click the checkmark icon to save the new label.
- Because the list is sorted alphabetically in ascending order, the new label may disappear from view after you save it.
- If the label is used in more than one language, be sure to switch the language using the "Select language" drop-down and then modify the value of the label for the other language(s) in which it will be used.
Modifying a Language Label
You can modify both the default XperienCentral language labels as well as all custom language labels. To modify a language label, follow these steps:
- Select the language for which you want to modify the label(s) from the Select Language drop-down list.
- Click the pencil icon next to the label you want to modify:
- Modify the language label "Value" string.
- Click the checkmark icon to apply the change.
- Repeat these steps for all labels that you want to modify for the selected language.
- Click [Apply] to submit your modifications.
Deleting a Modified Language Label
English (EN) and Dutch (NL)
The default language labels in English and Dutch cannot be deleted. However, if you have modified a language label, you can delete the modification. To do so, click the "trash" icon to the right of a modified language label. The modification will be deleted and the default value of the label will be restored. If a default language label has not been modified, the "trash" icon is grayed out and unavailable.
Other Languages
For every language that you add to XperienCentral in addition to English (EN) and Dutch (NL), all language labels can be deleted.
Language
The "Language" tab shows the languages that are available for content in XperienCentral. The default languages are "Dutch" and "English". Here you can also add more languages or delete any language(s) that you have added.
Language Properties
For each supported language, the following properties are shown:
Property | Description |
---|---|
Default language | Specifies whether language is the default language. See "Setting the Default Language for XperienCentral" below for more information. |
State | Shows the state of the language (Active or Inactive). To change the state of a language, click the pencil icon to the right of the language. You can then check or clear the "State" checkbox to make the language active or inactive: Click the checkmark icon to save the change. |
Dutch name | The string that appears in drop-down lists in XperienCentral when you select the language property for a content item and in the Language drop-down when the GUI is set to "Dutch". |
English name | The string that appears in drop-down lists in XperienCentral when you select the language property for a content item and in the Language drop-down when the GUI is set to "English". |
Meta tag value | The description of the language in the form locale_LOCALE based on the ISO 639 standard (en_EN for English, nl_NL for Dutch, and so forth). |
Fallback | The language version to use if a content item cannot be found in the requested language. To select the fallback language, expand the drop-down list and select it. This functionality only works if the setting "Use another language if language is not available" is selected in the General tab of Configuration > Channel Configuration. See Channel Configuration. See also Working with Language Versions in XperienCentral for general information about maintaining multiple language versions of a channel. |
Delete | Languages that have been added in addition to "Dutch" and "English" can be deleted by clicking the "trash" icon to the right of the language. The languages "Dutch" and "English" cannot be deleted. |
Adding a Language
To add a new language to XperienCentral, follow these steps:
- Click [+New Language].
- In the "Dutch name" field, enter the name of the language as it appears in XperienCentral when the editing language is set to "Dutch".
- In the "English name" field, enter the name of the language as it appears in XperienCentral when the editing language is set to "English".
- In the "Meta tag value" field, enter the ISO 639-1 code for the language in the format xx_XX. For example, for German the Meta tag value would be "de_DE".
- Select the "Fallback language".
- Define the labels for the new language.
- Make the new language active.
The new language is now available in the language drop-down lists in the left and right Sidebars. For example:
The new language is now also available in the default language drop-down list for a page. For example:
Setting the Default Content Language for XperienCentral
In XperienCentral, you can set any of the available languages as the default content language of the edit environment. The default content language determines the following:
- The language drop-down in a sidebar header is set to the default content language each time you start a new XperienCentral session.
- All content items you create are in the default content language if you do not switch languages.
- Content created by a developer using the Java API is in the default content language if one is not explicitly specified in the code.
Dutch is the default language for the XperienCentral edit environment in a clean installation.
The default content language is the one with "Yes" in the "Default language" column. To change the default language, follow these steps:
- Click the pencil icon next to the language you want to make the default.
- Click the checkbox in the "Default" language column to select it:
- Click the checkbox to the right of the language to save its settings. The language is now the default.
Deleting a Language
To delete a language, follow the steps below. You can only delete a language that you have added. Because Dutch and English are the default supported languages in XperienCentral, neither of them can be deleted.
When you delete a language, all content items based on that language will also be deleted, therefore you should exercise extreme caution when performing this operation.
To delete a language:
- Click the "trash" icon next to the language you want to delete.
- Click [Delete] to confirm the operation:
All the labels for the language and all content items containing the language are deleted.
Exporting Custom Language Labels
You can export custom language labels as well as default language labels that have been modified to a file and then import them in another XperienCentral web initiative.
To export custom language labels, follow these steps:
- Click the "Export" tab.
- Select the language from which you want to export the labels from the "Select language" drop-down list. Select "All languages" to export all custom/modified labels from all languages in your XperienCentral web initiative.
- The custom/modified language labels present in the language(s) you selected are saved in the Downloads folder of your browser in a .zip file. Within the export file there is a .properties file for each exported language containing a mapping between the name of the custom label and its value.
Importing Custom Language Labels
You can import custom language labels and default languages that have been modified from another XperienCentral web initiative into the current web initiative.
To import custom/modified language labels from one or more languages, follow these steps.
- Click the "Import" tab.
- Navigate to the folder containing the .zip language label export file.
- Select the file.
- Click [Import]. The language labels present in the export file are imported into the present web initiative.
Inheritance
If a language label is empty it is possible to have it inherit the value from a related language label. This can be turned on in the General tab of the Setup Tool by enabling the property use_languagelabels_inheritance
. When enabled, an empty label with name search.button.find
will use the value from button.find
if available. Abstractly the inheritance structure works like this: a.b.c > b.c > c
Providing Default Language Labels in a Plugin
You can provide default values for language labels that are contained in a plugin.
To do so, follow these steps:
- Add or update a service in your plugin that implements the
LanguageLabelProvider
interface. - Add language label property files to your plugin for the languages in your website. These files should be added to the
src/main/resources/languagelabels
folder of your plugin. The file should be named using the following convention:languagelabels_<metatag of language>.properties
for example,languagelabels_en_US.properties
.
These files should contain language label mappings in the following format:key=value
For example,anchor_back_to_top=Back to top
.
In the Language Labels panel, you manage the labels for all the available languages in XperienCentral. This includes labels that appear in content elements and all informational and error messages. You can also add new languages and set the default content language.
See also Working with Language Versions in XperienCentral for general information about maintaining multiple language versions of a channel.
To access the Language Labels panel, navigate to Configuration > Language Labels:
In the top of the panel, expand the "Select website" drop-down list to select the channel for which you want to configure the languages/language labels.
Language Properties
For each supported language, the following properties are shown:
Property | Description |
---|---|
Order | In the far left column, a number is assigned to each language. This affects the order that they appear in the "Select Language" drop-down list as well as the order from top to bottom in the language drop-down in a sidebar header or the Language Widget in XperienCentral versions R31 and lower. To change the order, select a new number for the language(s) and then click [Apply]. The language assigned the ranking "1" is the default content language (see below). The ordering (ranking) of languages in the Language Labels panel is channel specific. |
Active | When this checkbox is selected, the language is active and available to be used in XperienCentral. |
Language Code | The internal ID of the language in XperienCentral. |
Name in XperienCentral | The string that appears in drop-down lists in XperienCentral when you select the language property for a page and in the Language Widget. |
Metatagvalue | The description of the language in the form locale_LOCALE based on the ISO 639 standard (en_EN for English, nl_NL for Dutch, and so forth). |
Fallback | The language version to use if a content item cannot be found in the requested language. To select the fallback language, expand the drop-down list and select it. This functionality only works if the setting "Use another language if language is not available" is selected in the General tab of Configuration > Channel Configuration. See Channel Configuration. |
Delete | A checkbox for deleting a language. You can only delete a language that you have added. Because English and Dutch are the two standard languages supported in XperienCentral, they cannot be deleted. |
Copy | A button for copying all the language labels for a language. You use this functionality to add new languages. |
In This Topic
Setting the Default Content Language for XperienCentral
The following applies to XperienCentral versions R31 and higher.
In XperienCentral, you can set any of the available languages as the default content language of the edit environment for each channel. The default content language determines the following:
- The language drop-down in a sidebar header (or the Language Widget in XperienCentral versions R31 and lower) is set to the default content language each time you start a new XperienCentral session.
- All content items you create are in the default content language if you do not switch languages.
- Content created by a developer using the Java API is in the default content language if one is not explicitly specified in the code.
- Dutch is the default language for the XperienCentral edit environment in a clean installation.
- If you upgrade to XperienCentral R31 or later from an earlier version, check the ranking of available languages in your XperienCentral deployment as described below in order to ensure that the default content language is the one you want it to be.
The default content language can be seen at the top of the Language Labels panel in the list of available languages. The current default content language is assigned the number "1" ranking. For example:
In the example above, Dutch is ranked number "1" in the list which means it's the default content language. The ordering thereafter is the order the available languages appear in the Language Widget.
The ordering (ranking) of languages in the Language Labels panel is channel specific.
To change the default content language in XperienCentral, follow these steps:
- In the list of supported languages, change the ranking of the language that you want to make the default by assigning it the number "1".
- Modify the ranking of the other languages as needed in order to ensure that no numbers are skipped or doubled. In the example below, the list has been modified to make English the default content language, therefore "2" was changed to "1" for it and the ranking for Dutch was changed from "1" to "2":
- Click [Apply]. The sort order is automatically refreshed back to ascending. For example:
In the example above, English is now set as the default content language.
Following the steps above, you can also change the ranking of the non-default content languages in order to affect the sort order from top to bottom in the Language Widget.
Modifying a Language Label
To modify a language label, follow these steps:
- Select the language for which you want to modify the label(s) from the Select Language drop-down list.
- Expand the section containing the label(s) by clicking the plus [+] sign next to it.
The language labels appear. On the left side of the list is the internal identifier for the language label and in the text field next to it is the current label being used for it in the current language. To modify a label, click in the field and change the text. In the example below, the string for the "Author" line in the Downloads content element is changed to "Publisher": - Click [Apply]. After clicking [Apply], the label is modified. In the Editor, the label in the Download content element now appears as "Publisher":
- Repeat these steps for all labels that you want to modify for the selected language.
- Click [Apply] to submit your modifications.
Deleting a Language Label
For XperienCentral versions 10.22.0 and earlier, GX Software strongly recommends that you do not delete any language labels whatsoever because this can lead to serious problems. This issue has been resolved in XperienCentral versions 10.22.1 and higher.
To delete a language label, follow these steps:
- Expand the section containing the language label you want to delete.
- Select the checkbox to the right of the language label in the "Delete" column.
- Click [Delete]. A confirmation dialog box will appear.
- Click [OK]. The language label is deleted.
Copying a Language
The best way to add a new language to XperienCentral is to copy all of the labels for an existing language and then modify the labels in the copied language to the new one you want to support. To copy a language, click [Copy] next to the language. For example:
XperienCentral will then prompt you to provide a code for the new language. For example:
Click [Apply]. The new language will appear in the list. Enter the translation of the language's name in Dutch and English. For example:
Modify the labels for the new language. Once copied, the new language is available in the Language Widget. For example:
The new language is now also available in the default language drop-down list for a page. For example:
Deleting a Language
To delete a language, follow the steps below. You can only delete a language that you have added. Because Dutch and English are the default supported languages in XperienCentral, neither of them can be deleted.
When you delete a language, all pages based on that language will also be deleted, therefore you should exercise extreme caution when performing this operation.
To delete a language:
- Select the checkbox for the language in the "Delete" column in the list of languages.
- Click [OK] to confirm the operation:
The labels for the language are deleted.