Create a language identifier attribute

You can add attributes to provide more information about XML elements and configure component relationships in the system. In DITA, you need a language identifier to tell Inspire and other processes such as translation what language the content is written in.

You must have Administrator permissions to manage attributes.

In DITA, you need a language identifier, specifically the <lang> attribute, primarily for the following reasons:

  • Facilitating Translation and Localization: Specifying the language of your content using the <lang> attribute is crucial for efficient translation workflows. Translation tools and processes rely on this attribute to properly identify the source language and ensure accurate translation into the target language.
  • Enabling Automatic Processing and Styling: DITA processors, such as the DITA Open Toolkit, use the <lang> attribute to process and style content appropriately for the specified language and locale. Without it, processors may assume a default language which could lead to incorrect output.
  • Enhancing Content Portability and Reuse: By clearly marking the language of content, you ensure greater portability and reuse of your DITA files. This makes it easier to manage and update multilingual documentation sets, as the language boundaries are clearly defined, according to the Oxygen XML editor

Inspire can store the language you are using to create your documentation in the following ways:

  • Components: Inspire uses the <xml:lang> attribute
    • If the Language you are using is French, this value is stored in <xml:lang>
    • This <xml:lang> identifier is added to all elements in the component

Rules for language identifiers:

  • There must be only one attribute that is the language identifier.
    • Inspire provides a default language identifier attribute (<xml:lang> ).
    • You can create your own language identifier attribute as long as no other attribute already uses the Language option.
  • It is not possible for an attribute to be both a language identifier and a component identifier.

To create a language identifier attribute:

  1. Sort the attribute list to find any other attribute that has the Language property.
  2. If another attribute has the Language property, remove it.
  3. Do one of the following:

Sort the attribute list

You can list the attributes in order by Identifier to see if any other attribute already has the Identifier property. In Inspire, you can only configure one attribute to be a DITA identifier and only one different attribute to be a DocBook identifier.

To sort the attribute list:

  1. From the Administration menu, select Advanced Settings, and then Attribute Management.
  2. Next to the column named Language, click the drop-down arrow and select Sort Descending.

  3. Check the Language column to see if any other attribute has a value of Yes.

    To assign the Language identifier to a different attribute:

    • You can clear the Language option in an existing attribute
    • You can delete the existing attribute that uses the Language attribute

Optionally, remove the Language property from an existing attribute

If you want to create your own Language identifier attribute or update an existing one to include the Language property, you must update any attribute that currently includes the Language option.

Rules for Language identifiers:

  • There must be only one attribute that is the Language identifier.
  • It is not possible for an attribute to be both a language identifier and a component identifier.

To remove the Language property from an existing attribute:

  1. On the Attribute Management tab, select the attribute that has the Language property.
  2. At the end of the attribute's row, click Update.

    Result: The Update attribute screen opens.

  3. Clear the checkbox for Language.
  4. Click Update.

    Results: Administrators can see the updated attribute on the Attribute Management tab in the list of attributes.

Create a new attribute with the Language property

If you want to add the Language property to an attribute that doesn't exist yet, you can create a new attribute. You can add the Language property while creating a new attribute.

Rules for Language identifiers:

  • There must be only one attribute that is the Language identifier.
  • It is not possible for an attribute to be both a language identifier and a component identifier.

To create a new attribute with the Language property:

  1. On the Attribute Management tab, click Create.

    Result: The Create new attribute screen opens.

  2. Enter a unique Name using 100 characters or less.

    Important:

    • This is a system name, so you cannot use spaces or special characters
    • The name must be different from any system-created names, like <id>, <xml:id>, or <xml:lang>
  3. Optionally, you can create a similar Display Name that's more user-friendly.

    Notes:

    • Use 100 characters or less
    • This is the name an author will see when selecting an attribute in the Oxygen editor
    • If you don't enter a Display Name, the system Name is shown instead
  4. In Schema Standard, select the schema version that must be used to validate the attribute. For example, DITA_1.3.
  5. Select Language.

    Important:

    • It is not possible for an attribute to be both a language identifier and a component identifier.
    • If you select the Language option, there must be no other attribute that already has this property.
    • If you select the Language option, you cannot also select the Identifier option.
    • For more information, refer to: Why do I need an attribute that is a language identifier?
  6. To create the attribute, click Create.
    Results:
    • Administrators can see the new attribute on the Attribute Management tab in the list of attributes.
    • Administrators can select the attribute from the lists on the XML Link Type Configuration screens.
    • Inspire adds the Language identifier to all elements in a component.

Update an existing attribute to add the Language property

If you want to add the Language property to an attribute that already exists, you can update the attribute to add the property.

Rules for Language identifiers:

  • There must be only one attribute that is the Language identifier.
  • It is not possible for an attribute to be both a language identifier and a component identifier.

To update an existing attribute to add the Language property:

  1. On the Attribute Management tab, select the attribute you want to update.
  2. At the end of the attribute's row, click Update.

    Result: The Update attribute screen opens.

  3. Select Language.

    Important:

    • It is not possible for an attribute to be both a language identifier and a component identifier.
    • If you select the Language option, there must be no other attribute that already has this property.
    • If you select the Language option, you cannot also select the Identifier option.
    • For more information, refer to: Why do I need an attribute that is a language identifier?
  4. To save your changes, click Update.
    Results:
    • Administrators can see the updated attribute on the Attribute Management tab in the list of attributes.
    • Administrators can select the attribute from the lists on the XML Link Type Configuration screens.
    • Inspire adds the Language identifier to all elements in a component.