ng:spellOutNumber

ng:spellOutNumber

ng:spellOutNumber(number,locale)

 

The built-in XPath function, ng:spellOutNumber can help you to spell out a number as text.

The output text is as-is and might not fit the exact way to write the amount of a text in any locale, but you can e.g. replace texts with the replace XPath function.

 

The function accepts two parameters:

 

number

This is the number (or amount), that you want to output spelled out.

 

locale

This is the identification of the output language. This must be the full locale e.g. en-US, de-DE etc.

 

Examples:

 

Function

Outputs

ng:spellOutNumber(123,'en-GB')

one hundred twenty-three

ng:spellOutNumber(11123.45,'en-GB')

eleven thousand one hundred twenty-three point four five

ng:spellOutNumber(123,'de-DE')

ein­hundert­drei­und­zwanzig

ng:spellOutNumber(123,'dk-DK')

hundrede og tre­og­tyve

 

    • Related Articles

    • ng:resourceExist

      ng:resourceExist(resource,path) This function checks, if a resource in InterFormNG2 exists or not. The function returns a boolean: true or false. The ng:resourceExist Xpath function has this format: ng:resourceExist(resource,path), where: resource ...
    • ng:decrypt

      The built-in function, ng:decrypt is linked with the encryption functions: ng:encrypt and the workflow component, Set secure workflow variable. The function, ng:decrypt can decrypt contents, that was previously encrypted with these functions. The ...
    • ng:minimum

      InterFormNG2 includes the special built-in XPath function, ng:minimum. This function returns the smallest value of two numeric arguments. The function only accepts two numeric arguments - no more and no less. Examples: ng:minimum(-14,2) returns 2 ...
    • ng:base64

      The built-in function, ng:base64 converts a string (text) into a base64 based string. This can e.g. be used, if you want to insert any kind of data into an XML node, without substituting any characters, that are not allowed. This function is related ...
    • ng:fileExist

      ng:fileExist(path) The ng:fileExist Xpath function has this format: ng:fileExist(path), where path contains the path to a file, that should be verified. The function returns true, if the file exists and false, if the file does not exist. The function ...