Translation API in SuiteScript 2.0

In SuiteScript, N/translation module lets developers use the Translation API and interact programmatically with NetSuite Translation Collections.

You can watch a video that demonstrates how to use the N/translation module to work with Translation Collections.

A Translation Collection is a customization object that stores translation strings with their translations. A single Translation Collection can contain many translation strings along with their translations. A translation string contains a key (identifier), its value (source string) and possibly also translations of the source string. A key references one string that can be translated into multiple languages. For example, a translation string for the word “hello” could consist of a key called HELLO and a string value of “hello”. The string can be translated into any language supported by NetSuite. For a list of these languages, see Configuring Multiple Languages.

You can create a collection of terms for translation in the NetSuite UI. To create this collection, your role must have the Manage Translations permission, or you must be using an Administrator role. You can export the collection of terms as an XLIFF translation file with a .xlf extension and send this file to a translation vendor. After the translation vendor provides translations, you can import the translation file back into your NetSuite account. You can use the collection of terms to translate labels and messages in your scripts, as well as in Suitelets and SuiteApps. For information about managing Translation Collections in the UI, see Manage Translations UI Overview.


The N/translation module provides read-only access. If you want to create or modify Translation Collections, you can do so only in the NetSuite UI at Customization > Translations > Manage Translations.

A Translation Collection is encapsulated in the translation.Handle object. The translation.Handle object is a hierarchical object, which means that each node in the object is either another translation.Handle object or a translation.Translator function. Translator functions combine strings with parameters. When you create a Translation Collection in the NetSuite UI, you can include parameter placeholders in your translation strings. The translator function injects the specified parameter values into the placeholders in the returned translation string.

For more information, see N/translation Module.

Related Topics:

Usage of Translations in SuiteScript
Using Translation Collections with SuiteScript
Translations in Advanced Printouts

General Notices