Define a language when uploading content - Fluid Topics - Latest

Manage Languages in Fluid Topics

Category
Technical Notes
Audience
public
Version
Latest

When uploading a structured or unstructured document, an ADMIN or KHUB_ADMIN user must configure the content language in one of the following ways:

  • In the content authoring software.
  • In a control file.

All language codes in Fluid Topics include an ISO 639-1 language designator in lowercase and an officially assigned ISO 3166-1 region designator in uppercase. For example: en-US, fr-CA, zh-TW, etc.

Configuring a content language via control file is not possible for the Author-it or Paligo connector. They do not support the Fluid Topics control file.

Example

It is possible to define the language of an unstructured document in the corresponding control file by using the lang attribute.

lang is an optional attribute of the <resource> element. It allows users to define the language of the resource, as shown in the following example:

<?xml version="1.0" encoding="UTF-8"?>
<controlFile>
    <resources>
        <resource lang="${Language code for the resource}">
        ...
        </resource>
    </resources>
</controlFile>

In the above example, the lang attribute expects the ISO 639-1 code in lowercase and an ISO 3166-1 code in uppercase, separated by a hyphen.

If lang is not set, Fluid Topics tries to automatically detect the language of the unstructured document. If this is not possible, the language is set to en-US.