NumberFormatter.locale

Property Description

The locale of the number formatter.

Type

string (read-only)

Module

N/format/i18n Module

Parent Object

format.NumberFormatter

Sibling Object Members

N/format/i18n Module Members

Since

2021.1

Syntax

Important:

The following code snippet shows the syntax for this member. It is not a functional example. For a complete script example, see N/format/i18n Module Script Samples.

            // Add additional code
...
var numFormatter = format.getNumberFormatter({
    groupSeparator: ' ',
    decimalSeparator: ',',
    locale: 'en_US',
    precision: 2,
    negativeNumberFormat: format.NegativeNumberFormat.MINUS
});

var theLocale = numFormatter.locale; //theLocale will be 'en_US'
...
// Add additional code 

          

Related Topics

N/format/i18n Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices