format.spellOut(options)

Method Description

Spells out positive and negative number as a string in a specific language

For more information, see Codes for the Representation of Names of Languages.

Returns

String

Supported Script Types

Client and server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

None

Module

N/format/i18n Module

Methods and Properties

N/format/i18n Module Members

Since

2019.1

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

Since

options.number

number

required

The number to be spelled out in a string.

2019.1

options.locale

string

required

The language code that specifies the string’s language. ISO 639–1 alpha-2 language codes are supported.

The language specified in this parameter is not related to the language specified for a NetSuite account. You can specify any language for this parameter; you do not have to specify a NetSuite supported language.

For more information, see Codes for the Representation of Names of Languages.

2019.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 spellOut = format.spellOut({
        number: 12345, 
        locale: "DE"
    });
// spellOut is 'zwölf­tausend­drei­hundert­fünf­und­vierzig'
...
// Add additional code 

          

Related Topics

General Notices