Format 12345 as a German String

The following sample spells out the number 12345 as a string in German, “zwölf­tausend­drei­hundert­fünf­und­vierzig”.

Note:

This sample script uses the require function so that you can copy it into the SuiteScript Debugger and test it. You must use the define function in an entry point script (the script you attach to a script record and deploy). For more information, see SuiteScript 2.x Script Basics and SuiteScript 2.x Script Types.

          /**
 * @NApiVersion 2.x
 */
require(['N/format/i18n'], function(format) {
     var spellOut = format.spellOut({
        number: 12345, 
        locale: "DE"
    });
    // spellOut is 'zwölf­tausend­drei­hundert­fünf­und­vierzig'
}); 

        

General Notices