Translation Support for Global Attribute Values on Standard Control Characteristics in MPMLink
The system provides translation support for global attribute values on standard control characteristics in MPMLink.
For more informations on setting up translation and setting up translated text attributes, see the following topics:
Prerequisites to Enable Translation Support for Standard Control Characteristics in MPMLink
Following are the prerequisites to enable translation support for global attribute values on standard control characteristics.
|
Property
|
Description
|
|
wt.translate.Translatable.enable
|
If set to true, enables the translation capability.
If set to false, disables the translation capability.
|
2. From Type and Attribute Management utility, go to > :
◦ Click Source Languages, select the desired languages, and move to Available for selection table.
◦ Click Target Languages, select the desired languages, and move to Available for selection table.
3. To enable the authoring language for standard control characteristics, copy the following content in a file. Save the file and load the file using the LoadFromFile utility.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE NmLoader SYSTEM "standard12_1.dtd">
<NmLoader>
<csvBeginUpdateTypeDefView
handler="com.ptc.core.lwc.server.TypeDefinitionLoader.beginUpdateTypeDefinition">
<csvname>com.ptc.windchill.mpml.pmi.MPMStandardCC</csvname>
<csvmandated>true</csvmandated>
</csvBeginUpdateTypeDefView>
<csvBeginUpdateProperties
handler="com.ptc.core.lwc.server.TypeDefinitionLoader.beginUpdateProperties">
<csvmandated>true</csvmandated>
</csvBeginUpdateProperties>
<csvUpdatePropertyValue
handler="com.ptc.core.lwc.server.TypeDefinitionLoader.updatePropertyValue">
<csvobject>attr|translationInfo.authoringLanguage</csvobject>
<csvname>systemHidden</csvname>
<csvisDefault>false</csvisDefault>
<csvvalue>false</csvvalue>
</csvUpdatePropertyValue>
<csvEndUpdateProperties
handler="com.ptc.core.lwc.server.TypeDefinitionLoader.endUpdateProperties" />
<csvEndUpdateTypeDefView
handler="com.ptc.core.lwc.server.TypeDefinitionLoader.endUpdateTypeDefinition" />
</NmLoader>
Use Case: Creating a Translate Attribute for Standard Control Characteristic
Perform the following steps to create a translate attribute for Standard Control Characteristic:
1. Create a global attribute with the internal name SCC_IBA of the string data type.
2. Create a translated text attribute with the internal name translated_SCC_IBA for global attribute SCC_IBA created in step 1.
. For example,
com.ptc.windchill.mpml.pmi.MPMStandardCC-_-SCC_IBA.
|
|
You can use any unique name. Ensure that the translation directory name matches with directory name specified in TranslationDictionary.xml.
|
3. Add the attributes SCC_IBA, translated_SCC_IBA, and Authoring Language in the creation layout of standard control characteristics.
4. To view the translation, add attributes SCC_IBA, translated_SCC_IBA, and Authoring Language in the information page layout of the Type Attributes group for standard control characteristics.
5. Create the Standard Control Characteristic.
◦ Set the Authoring Language attribute value to en. Here, en means the English language.
◦ Set SCC_IBA attribute value to This is the text to be translated.
6. Load the TranslationDictionary.xml file with load from utility with appropriate authoring language, target language and translated text.
Here is an example of the loader file:
<?xml version="1.0" ?>
<!DOCTYPE NmLoader SYSTEM "standard12_1.dtd">
<NmLoader>
<csvTranslationDictionaryEntry handler="com.ptc.core.td.LoadDictionary.createEntry">
<csvdictionaryName>com.ptc.windchill.mpml.pmi.MPMStandardCC-_-SCC_IBA</csvdictionaryName>
<csvsourceLanguage>en</csvsourceLanguage>
<csvmasterText>This is the text to be translated</csvmasterText>
<csvtargetLanguage>ja</csvtargetLanguage>
<csvtranslatedText>Japanese translation of master text specified in tag</csvtranslatedText>
<csveffectiveStart></csveffectiveStart>
<csveffectiveEnd></csveffectiveEnd>
</csvTranslationDictionaryEntry>
</NmLoader>
7. Once the loader successfully runs, you must change the language of the Windchill browser to ja. Here, ja means the Japanese language. You can verify if the value of the translation attribute displays This is the text to be translated.
Related information