Translation Collection Object Fields in XML Definitions
In SuiteCloud Development Framework (SDF), the
translationcollection SDF custom object defines the Translation Collection by including the following information:
Translation Collection record metadata - such as
name, defaultlanguage, and
Translation strings - which are the list of strings that are being translated. Each string contains the following attributes and fields:
scriptid– is the attribute for the string field, and is used as an identifier for the translation string. This
scriptidattribute value is also known as the term or key. If an XLIFF file is included in a SuiteCloud project, this value is also used as the id attribute value for the trans-unit field.
defaulttranslation– specifies the default translation used for the term. This translation is in the same language as the default language.
description (optional)– provides a description for the term. This description is exported to the XLIFF and helps translation vendors understand the context of the term for accurate translation. The term’s description is the when, where, and why users see the term’s string in the application.
For information about all of the available fields, see translationcollection.
Consider the following information when defining
The filename and
translationcollectionobject begins with the prefix
scriptidattribute term can be lowercase alphanumeric with underscores. Duplicate terms cannot be specified within the same Translation Collection.
String values for terms are not required, and can be added later from the NetSuite UI. Although string values cannot be stored in the
translationcollection, they can be included in XLIFF files in the SuiteCloud project. For more information, see Translation Collection Strings in SuiteCloud Projects.
defaultlanguagevalue is set at the time the
translationcollectionis created in an account. Subsequent deployments cannot change the default language for a Translation Collection. The
defaultlanguagevalue must be one from the list of static values listed in translationcollection_defaultlanguage.
The name and description fields can be translated. To translate the name and description fields, reference terms from the same translation collection. For information about working with translatable fields in SDF custom objects, see Translatable Fields on SDF Custom Objects.
The following example defines a
translationcollection object with a user-readable name of Accommodation Collection and the
<translationcollection scriptid='custcollection_accommodation'> <name>Accommodation Collection</name> <defaultlanguage>en-US</defaultlanguage> <description>This Translation Collection contains terms for the Hotel customization.</description> <strings> <string scriptid='front_desk'> <defaulttranslation>front desk</defaulttranslation> <description>The front desk of a hotel</description> </string> <string scriptid='accommodation'> <defaulttranslation>accommodation</defaulttranslation> </string> </strings> </translationcollection>
In the preceding example, the object defines translated strings for a custom record that is used for hotel accommodation information. The default language is United States English, and the
defaulttranslation value for each term is also in United States English. The first term is
front_desk, which has a the default translation “front desk”.