Translatable Fields on SDF Custom Objects

When creating SDF custom objects in SuiteCloud projects for SuiteCloud Development Framework (SDF) that have translatable fields, you can reference translation strings from translation collections. After the custom objects and the translation collections are deployed to an account, the NetSuite UI displays the translation for each translatable field in the account language. If a field has no translation in the account language, the default translation is displayed in the NetSuite UI.

For information about translatable fields function in a NetSuite account, see String Hierarchy and Translation String Linking.

For more information about translatable fields in SDF custom objects, see the following:

Using Translatable Fields in SDF Custom Objects

The following steps contain the high-level process for using translations in XML definitions for SDF custom objects:

  1. Identify the SDF custom object that contains the translatable fields that you intend to translate. For information about that, see Translatable Fields Supported in SDF Custom Objects.

    To create an SDF custom object from a template, see the following topics:

    To create or import or an existing SDF custom object from a NetSuite account, see the following topics:

  2. Create or import a translation collection, and then add translation strings (terms) for each SDF custom object field value that you would like to translate. For more information, see Translation Collections as XML Definitions.

  3. For the translatable fields in the SDF custom object from step 1, set the attribute translate=”T”, and then reference the term from the translation collection from step 2.

    The following is an example of the displaylabel field referencing the hotel term in the custcollection_accomodations translation collection:

                    <displaylabel translate="T">[scriptid=custcollection_accomodations.hotel]</displaylabel> 

    For information about the translation reference format and code samples, see Translation Reference Format and Translatable Field XML Examples.

  4. Export the XLIFF file for the translation collection from step 2, and send it to your translators. For information about exporting XLIFF files, see Exporting a Translation Collection.

  5. Add XLIFF files for various languages received from the translators to the translations folder in the SuiteCloud project. For more information about SuiteCloud project folders, see SuiteCloud Project Components.

Translatable Fields Supported in SDF Custom Objects

You can identify translatable fields that are supported in SDF custom objects by searching in the SuiteCloud Development Framework XML Reference for the following text: This field accepts references to the string custom type.

The string custom type refers to the string topic that has information about the translation collection fields. For more information about those fields, see Translation Collections as XML Definitions

Considerations For Translatable Fields

Consider the following information when using translatable fields in XML definitions:

  • A translatable field cannot reference translation strings that are not in the same SuiteCloud project.

  • Translation strings can be reused in multiple translatable fields within your SDF SuiteApp. Consider the following information when reusing translation strings for translatable fields:

    • Multiple SDF custom objects within the same SuiteApp can reference the same translation string. SDF custom objects in other SuiteApps cannot reference that same translation string.

    • Multiple fields within the same SDF custom object can reference the same translation string.

  • Setting the translation=F attribute for a translatable field signifies that the value is a literal string. For information about the translate attribute and reference format, see Translation Reference Format.

Translation Reference Format


The translation reference format requires a translation collection object. For information about using translation collections in SDF, see Translation Collections as XML Definitions.

You can translate fields by using the following format:

  • Set the field translate attribute to true, by setting translate=T.

  • For the field value, specify a reference to the translation using the following format: translationCollection.string, where: translationCollection is the name of the translation collection and string is the script id for the translation string in the specified translation collection. For example, scriptid=custcollection_accomodations.hotel is a script ID reference to the string hotel in the translation collection custcollection_accomodations.

The following example combines the two previous examples and presents them in XML format:

            <displaylabel translate="T">[scriptid=custcollection_accomodations.hotel]</displaylabel> 


You can provide a literal string for translatable fields by specifying translate attribute as false and providing a literal string value. For example:

            <displaylabel translate="F">Hotel</displaylabel> 


If the translate attribute is omitted, it is the same as specifying translate="F".

Translatable Field XML Examples

The following example is a workflow SDF custom object with a label field that contains a reference to the term approve in the translation collection custcollection_approvals:

            <workflow scriptid="customworkflow1">

    <name>My custom workflow</name>





        <workflowstate scriptid="workflowstate_approvalpending">

            <name>State 2: Pending Approval</name>


            <workflowactions triggertype="BEFORELOAD">

                <addbuttonaction scriptid="workflowaction_approvebutton">


                <label translate="T">[scriptid=custcollection_approvals.approve]</label>










The following example is a custom workflow object where:

  • The workflow name references the string opportunityname in the translation collection custcollection_opportunity.

  • The workflow state name references the string state1 in the translation collection custcollection_opportunity.

            <workflow scriptid="customworkflow_opportunity">


<name translate=T>[scriptid=custcollection_opportunity.opportunityname]</name>



        <workflowstate scriptid="workflowstate1">



            <name translate=T>[scriptid=custcollection_opportunity.state1]</name>



            <workflowactions triggertype="ONENTRY">

                <setfieldmandatoryaction scriptid="workflowaction1">


















The following example is a translation collection object where its own name and description fields are translated:

            <translationcollection scriptid='custcollection_accommodation'>

    <name translate="T">[scriptid=custcollection_accommodation'.accommodation]</name>

    <description translate="T">[scriptid=custcollection_accomodation.accommodation_description]</description>


    <description>This Translation Collection contains terms for the Hotel customization.</description>


        <string scriptid='accommodation'>

            <defaulttranslation>Accommodation Translation Collection</defaulttranslation>




        <string scriptid='accomodation_description'>

            <defaulttranslation>This translation collection is translated into multiple languages.</defaulttranslation>





In the preceding example, the name of the translation collection references the string accommodation and the description for the translation collection references the string accomodation_description. Both the name and description fields reference strings in the custcollection_accommodation translation collection, which is the same translation collection for those name and description fields.

Related Topics

Developing SDF Custom Objects
Syntax Guidelines and Reference Formats for SDF Custom Objects
Downloading the XML Definition of an Object from a NetSuite Account
SDF Custom Object File Structure
Account-Specific Values Validation in SuiteCloud Projects
Date and Time Formats in SDF Custom Objects
Lists, Records, and Fields
Import and Export
Published Dashboards and Portlets
Centers and Tabs
Users and Roles in SDF
SuiteCommerce Web Site Management
SuiteAnalytics Workbooks

General Notices