Work with language-specific fields

Orange Logic administrators can create custom fields with variations for specific languages. The boolean <MultiLanguageSupport> metadata field attribute indicates whether multiple language support has been activated for a field.

📙

Feature documentation

Translate Orange Logic

When you retrieve a custom field, you can specify the language of the content to return using the ForLanguage parameter. You can also specify the language variation to work with when you create or update the value of a custom field, using the multilanguage-field variable.

ℹ️

Note

The ForLanguage parameter and multilanguage-field variable work with custom fields, which are single fields with language-specific variations. Language-specific Core fields are separate fields with unique names so you don’t need the parameter or variable to specify the field for a particular language.

Multiple language support in custom fields is available beginning in Orange Logic Nice.

Read

To retrieve the value of a custom field that has multiple language variations, use one of the following call structures:

  • This call structure returns the value of the field that corresponds to the environment's default language.

    https://{OrangeLogicURL}/API/DataTable/V2.2/Documents.{type}.{subtype}:Read?{asset identifier}

  • This call structure returns the value of the field that corresponds to the language you specify.

    https://{OrangeLogicURL}/API/DataTable/V2.2/Documents.{type}.{subtype}:Read?{asset identifier}&ForLanguage={language}

  • This call structure returns the value of each language-specific variation of the field.

    https://{OrangeLogicURL}/API/DataTable/V2.2/Documents.{type}.{subtype}:Read?{asset identifier}&ForLanguage=All

Create or Update

To set the value of a field that supports multiple languages, use either of the following call structures:

  • This call structure updates the field that corresponds to the user's selected language.

    https://{OrangeLogicURL}/API/DataTable/V2.2/Documents.{type}.{subtype}:CreateOrUpdate?{asset identifier}&{field name}-multilanguage-field:={value}

  • This call structure updates the field that corresponds to the language you specify.

    https://{OrangeLogicURL}/API/DataTable/V2.2/Documents.{type}.{subtype}:CreateOrUpdate?{asset identifier}&{field name}-multilanguage-field.{language}:={value}