The dialogs and tabs that come with Data Standard automatically support twelve different languages.
Text strings for these languages are defined in XML files. The files are located here:
C:\ProgramData\Autodesk\<Vault version>\Extensions\DataStandard\<localization folder>
where <language code> is the folder name for a language (e.g., en-US, de-DE, it-IT).
These files can be extended to support different languages in customized Data Standard dialogs.
Vault Client
By default, the language used for the Data Standard UI strings and the property translations is the same as the Vault client that is installed. However, this can be overridden by modifying the DSLanguages.xml file located at:
C:\ProgramData\Autodesk\<Vault version>\Extensions\DataStandard\Vault.
For example, if a Vault database is created with a German Vault Server, the property names are in German. If this Vault database is accessed with an English Vault Client, the DSLanguages.xml needs to be updated to allow an override. Add de-DE to the DB language code.
CAD
For Inventor and AutoCAD, the language is determined automatically and cannot be set. Data Standard tries to use the same language that the CAD application uses. If the CAD application uses a language that is not supported by Data Standard, English is used as fallback.
The Vault database language is not relevant for the CAD applications because Data Standard uses mapped properties (Inventor iProperties, AutoCAD DWG properties, and block attributes).
Sample: UIStrings.xml
<?xml version="1.0" encoding="utf-8"?> <UIStrings LanguageCode="en-US"> <!--Labels used in XAMLs--> <UIString ID="LBL1">Folder</UIString> <UIString ID="LBL2">Title</UIString> <UIString ID="LBL3">Description</UIString> ... </UIStrings>
The XML file contains a <UIStrings> element with an attribute LanguageCode to specify the language. The <UIStrings> element is a collection of <UIString> elements. The attribute ID has to be unique. For your own strings, Autodesk recommends that you use a prefix (e.g., ID="MYPREFIX_LBL1"). The value of the element is the text string.
How to Use UI Strings
The UI strings can be used in different Data Standard components by using the following expressions:
For example, <Label Content="{Binding UISTring[LBL2]}"/>
The above sample looks in the UIStrings.xml (based on the used language) for a <UIString> element with the ID LBL2 and returns the Title string and displays this as a label in the dialog.
This can be used in variables Description, Hint, Label, and NavigationTypes of a menu item definition. See MNU-File for more information.
Sample: PropertyTranslations.xml
<?xml version="1.0" encoding="utf-8"?> <PropertyTranslations LanguageCode="en-US"> <PropertyTranslation Name="NAME">Name</PropertyTranslation> <PropertyTranslation Name="TITLE">Title</PropertyTranslation> <PropertyTranslation Name="DESCRIPTION">Description</PropertyTranslation> ... </PropertyTranslations>
The XML file contains a <PropertyTranslations> element with an attribute LanguageCode to specify the language. The <PropertyTranslations> element is a collection of <PropertyTranslation> elements. The attribute Name has to be unique. The value of the element is the display name of the Vault property.
How to Use Property Translations
In XAML and in PowerShell files, Vault properties can be accessed by Prop[<property name>] expressions. Instead of using a fixed property name, the following syntax can be used:
For example: <TextBox Text="{Binding Prop[_XLTN_DESCRIPTION].Value}"/>
The prefix_XLTN_ in the above sample looks in the PropertyTranslations.xml for a <PropertyTranslation> element with the name DESCRIPTION and replaces the complete expression _XLTN_DESCRIPTION with the value Description. The content of the text box is then bound to the Vault property Description.