Create Custom String Literals

This topic applies to

Applies to

SuiteCommerce Web Stores

With the Vinson release of SuiteCommerce Advanced, NetSuite offers two ways to add new or customize existing string literals to change the default language values and corresponding translated values.

This topic applies to

Applies to

SuiteCommerce Web Stores | Aconcagua | Kilimanjaro | Elbrus | Vinson

Method 1: Use the SuiteCommerce Configuration Record

Use the SuiteCommerce Configuration record to specify new string literals that translate at runtime. NetSuite recommends this method when making small changes to translated content.

To configure properties in NetSuite:

  1. Select the domain to configure at Setup > SuiteCommerce Advanced > Configuration.

  2. In the SuiteCommerce Configuration record, navigate to the Multi-Domain tab and the Translations subtab.

  3. Add custom strings in the available table as needed. See Translations Subtab for details.

  4. Save the Configuration record.

This topic applies to

Applies to

SuiteCommerce Advanced | Kilimanjaro | Elbrus | Vinson | Mont Blanc | Denali

Method 2: Extend the Application

As an option, you can extend the application to change the string literals in the code and update the name-value pairs in the existing SC.Translation arrays. NetSuite recommends this method when making many changes to translated content.

You can also add new string literals that translate at runtime. When extending an application, ensure that new string literals you intend to localize are wrapped in the _.translate() function and that the corresponding language files are updated. If you have a small amount of customization to do, you can manually add the newly translated name-value pairs to the existing SC.Translations arrays for each language. However, if your web store includes many new string literals, NetSuite recommends scripting this process. Each time you compile your website code, all string literals wrapped in the _.translate() function should be processed to generate the appropriate name-value pairs in each language file.

Important

These language files must use UTF-8 character encoding to ensure proper display of international characters.