Setting Up Translated Text Attributes
A translated text attribute is a read-only attribute that displays the translated text for an associated source text attribute. The language of the translated text is based on the user’s browser locale setting. To display translated values, the source text attribute must have an associated translated text attribute. The translated values for the source text attribute are stored in a translation dictionary. The translation dictionary has entries for each target language.
Each master text value has a dictionary entry for each target language. A translation dictionary entry has the following information:
• the master text—the original attribute value to be translated.
• the source language—the language in which the master text was authored.
• the target language—the language into which the master text is translated.
• the translated text—the translation of the master text in the target language.
A translation dictionary is created when a translated text attribute is created or edited. If the value entered in the Translation Dictionary property does not match the name of an existing translation dictionary, a new one is created. Multiple attributes can reference the same translation dictionary. When creating or editing a translated text attribute, you can either:
• Use an existing translation dictionary by entering the exact name of the existing translation dictionary in the Translation Dictionary property.
• Create a new translation dictionary by entering a new translation dictionary name. If the value entered for the Translation Dictionary does not match an existing translation dictionary, a new translation dictionary is automatically created.
The Translation Dictionary property is required.
|
PTC recommends that you decide on a naming convention to use for naming your translation dictionaries to help with reusing translation dictionaries and to avoid creating spurious translation dictionaries. Once created, translation dictionaries cannot be deleted, even if they are unused.
|
For example, if a site uses the same naming convention for both parts and part lists, the translated text attributes associated with the Name attribute for both parts and part lists could point to the same translation dictionary for their translations. The Translation Name translated text attributes provided out-of-the-box and associated with the Name attributes for the Part and Part Master types both reference the same translation dictionary, named wt.part.WTPart-_-name.
The translated text values in a translation dictionary are populated when the associated translated XLIFFs are imported from the translation vendor or when a translated XLIFF document changes state from a non-preparation state to
Preparation State. See
XLIFF Documents for Translation for more information.
The translation dictionary specified for a translated text attribute is displayed in the Translation Dictionary property on the information page for the attribute. The Translation Dictionary property can only be edited on the type where the translated text attribute is defined; it cannot be edited on subtypes, where the translation text attribute is inherited.
When added to attribute layouts and table views, the translated text attribute displays the translated text value from the translation dictionary corresponding to the user’s browser locale setting. If the browser locale setting changes, the translated text attribute displays the translated value appropriate for the new locale setting. If there is no match to the user’s browser locale, then the master text for the attribute is displayed. For more information, see
Adding Translated Text Attributes to Attribute Layouts and
Adding Translated Text Attributes to Table Views.
Because translated text attributes are read-only attributes, they do not support default values or constraints.