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
- If the Language you are using is French, this value is stored in
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.
- Inspire provides a default language identifier attribute (
- It is not possible for an attribute to be both a language identifier and a component identifier.
To create a language identifier attribute:
Sort the attribute list
To sort the attribute list:
Optionally, remove the Language property from an existing 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 remove the Language property from an existing attribute:
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:
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: