DItem.ValueTranslation

Syntax

ValueTranslation: String;

Description

The ValueTranslation property determines translation text for value of MDM dictionary item attribute.

Comments

Use the setValueTranslation method to set the property value, and the getValueTranslation method to get the property value. Property value cannot be set from JSON.

The setValueTranslation method has three parameters: attrId - attribute ID, lcid - language code, value - attribute value.

The following parameters are specified on calling the getValueTranslation method: attrId, lcid, linkedVal - parameter indicating if a link to the value is returned.

If no translation is found for the attribute, this property is identical to the DItem.Value property.

Example

To execute this example, the page must contain the DictionaryBox component named dictionaryBox (see Example of creating the DictionaryBox component ). Set localized translation of value by the DESCRIPTION attribute for the first child element of the MDM dictionary:

// Get MDM dictionary
var source = dictionaryBox.getSource()[0];
// Get service to work with the dictionary
var service = source.getPPService();
// Get dictionary children
var childEls = source.getChildEls();
// Set a translation for value of the DESCRIPTION attribute
childEls[0].setValueTranslation("DESCRIPTION", PP.Cultures.en.LCID, "Ten-day period");
// Refresh dictionary elements tree
dictionaryBox.getDataArea().getActiveDictTree().refreshAll();

After executing the example localized translation of value by the DESCRIPTION attribute is set for the first child element of the MDM dictionary:

See also:

DItem