Default Language
The default language is English (United States), which is has the language code "en-us". For more information about the default language and how EnterWorks supports multi-language attributes, see Multi-language Support.
Attribute multi-language properties
An attribute's multi-language properties are:
- Name
- Description
- Value (for VARCHAR attributes only)
When you export a multi-language attribute, if you select the attribute but not a particular language variant of the attribute, the output language's variant will be used. For example, if the output language is Polish, the Polish variant of the value and the Polish variant of the attribute name will be used.
If you select a specific language variant of the attribute, that language variant will be used. For example, if the output language is Polish and you select the German variant of the attribute, the German variant will be used.
Output language
When you start an export, if you select Advanced Options, you can select an output language. The output language is the language that will be used for the repository and attribute names in the Data section. If you do not select an output language, the session language will be used as the output language.
Language
When you export records using a JSON or XML template, you can choose one or more languages for the export. For each language you choose, EnterWorks will include that language's variant of the attributes in the export. For example, if you choose Polish, Japanese, and Chinese, the Polish, Japanese and Chinese language variants will be exported.
Export attribute values
If an output language is specified, the attribute value exported will be the output language's variant of the value. If the attribute has no value for the specified language, the value will be left empty.
The value of State attributes that are of type VARCHAR are translated into the output language. State attributes of type DATE or TIMESTAMP are never translated.
For example, if your session language is Swedish and the attribute value variants for the default language, Polish, and French are defined, then:
- If the output language selected is Swedish, the value would be left empty because there is no Swedish language variant of the value defined.
- If the output language selected is Polish, the Polish variant of the value will be used.
- If the output language selected is German, the value would be empty because there is no German language variant of the value defined.
- If no output language is selected, the value would be left empty because there is no Swedish language variant of the value defined.
Export attribute and repository names
In the Data section of the output, if an output language is specified, the output language's variant of the attribute's name and repository's name will be used. If they do not have a value for the output language, the default language's variant will be used.
State attribute names will be translated to the output language.
For example, if EnterWorks was configured to support:
- the default language
- Swedish
- French
- Polish
- German
and the session language is: Swedish
if the attribute's name has been defined for:
- the default language:
Town
- Polish:
Miasto
- French:
Ville
the output attribute names would be:
- If the output language selected is Swedish, the default language value will be
used because there is no Swedish language variant of the attribute name. The
attribute names used would be:
Table 1. Attribute language Attribute name used Town Town Town's German language variant Town <Swedish-word-for-German> Town's French language variant Town <Swedish-word-for-French> Town's Polish language variant Town <Swedish-word-for-Polish> Town's Swedish language variant Town <Swedish-word-for-Swedish> - If the output language selected is Polish, the Polish language value will be
used. The attribute name used would be:
Nazwa
. Since there is a Polish language variant of the attribute name, the Polish variant of the attribute name will be used.Table 2. Attribute and language Attribute name used Town Miasto Town's German language variant Miasto <Polish-word-for-German> Town's French language variant Miasto <Polish-word-for-French> Town's Polish language variant Miasto <Polish-word-for-Polish> Town's Swedish language variant Miasto <Polish-word-for-Swedish> - If the output language selected is German, the default language value will be
used because there is no German language value defined. The attribute name used
would be:
Nazwa
.Table 3. Attribute and language Attribute name used Town Town Town's German language variant Town <German-word-for-German> Town's French language variant Town <German-word-for-French> Town's Polish language variant Town <German-word-for-Polish> Town's Swedish language variant Town <German-word-for-Polish> - If no output language is selected, the session language will be used: Swedish.
However, since there is no Swedish language variant of the attribute name, the
default language variant will be used. The attribute name used would be: Town.
Table 4. Attribute and language Attribute name used Town Town Town's German language variant Town <Swedish-word-for-German> Town's French language variant Town <Swedish-word-for-French> Town's Polish language variant Town <Swedish-word-for-Polish> Town's Swedish language variant Town <Swedish-word-for-Swedish
Repeatable Attributes Export Format
The format for repeatable attributes is shown in the example below. Three languages are exported: Polish, French, and Spanish.
"multi_lang_repo_repeatable test-pl": [
{
"lang": "pl",
"content": [
"repeat 1-pl",
"r2-pl",
"",
"",
"repeat 5-pl",
""
]
},
{
"lang": "fr",
"content": [
"repeat 4-fr",
"",
"",
"",
"",
"repeat 2-fr",
""
]
},
{
"lang": "es",
"content": [
"repeat 7-es",
"",
"",
"",
"",
"",
"repeat 3-es"
]
}
]