Configure Hosts for Sites with Multiple Languages
The hosts array within the Configuration.js file provides language-specific and currency-specific site support for multiple languages and currencies. This functionality is disabled by default. To enable this feature, configure the host for each language and define specific properties.
Follow the correct configuration procedures below, depending on your implementation. For information on configurable properties, regardless of your implementation, see Hosts Subtab.
Configure Hosts with the SuiteCommerce Configuration Record
This procedure applies to SuiteCommerce and the Vinson release of SCA or later.
To configure the hosts array:
-
Select the domain to configure at Commerce > Websites > Configuration.
-
In the SuiteCommerce Configuration record, navigate to the Multi-Domain tab and the Hosts subtab.
-
Set feature properties as required.
-
Save the Configuration record.
Configure the hosts Array
This procedure applies to the Mont Blanc and Denali releases of SCA.
To configure the hosts array:
-
Follow the steps presented in Set Up NetSuite for Localized Content.
-
Set up a hosted domain for each additional language on your site. See Domains for details on how to create new hosted domains.
-
Setup the SspLibraries module for customization.
See Develop Your SCA Customization for detailed information.
-
Open the Configuration.js file in the newly created module.
-
Within the
hosts
array, define a unique host for each location using thetitle
property. -
Define the
currencies
andlanguages
arrays for each host using the properties defined in this section.Note:For detailed information on the hosts array for Mont Blanc and Denali implementations, see Hosts Array Parameters (pre-Vinson).
For example, you want to set up a multiple-language site that contains three geographic locations: the United States, South America, and France. For each location, you want to define specific currencies and languages according to the following table:
Location
Currencies
Languages
United States
U.S. Dollar
English
South America
U.S. Dollar
Argentinian Peso
Uruguayan Peso
Spanish
Portuguese
English
France
Euro
U.S. Dollar
French
You set up NetSuite to allow multiple languages and enable the applicable languages and currencies. You then set up hosted domains for each translated language. The locale string must specify the country code and culture code for the associated language per ISO standards (ISO 639 and ISO 3166 respectively). Example: en_US or es_ES.
The following code snippet shows what your customization might look like.
, hosts: [ { title:'United States' , currencies:[ { title:'American Dollars' , code:'USD' } ] , languages:[ { title:'English' , host:'en.mysite.com' , locale:'en_US' } ] } , { title:'South America' , currencies:[ { title:'American Dollars' , code:'USD' } , { title:'Peso Argentino' , code:'ARS' } , { title:'Peso Uruguayo' , code:'UYU' } ] , languages:[ { title:'Spanish' , host:'sa.mysite.dev' , locale:'es_ES' } , { title:'Portuguese' , host:'pt.sa.mysite.dev' , locale:'pt_BR' } , { title:'English' , host:'en.sa.mysite.dev' , locale:'en' } ] }, { title:'French' , currencies:[ { title:'Euro' , code:'EUR' } , { title:'American Dolars' , code:'USD' } ] , languages:[ { title:'French' , host:'fr.mysite.com' , locale:'fr_FR' } ] } ]
-
Deploy the module to your site.