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.
ng:spellOutNumber(number,locale)The function accepts two parameters:
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') | einhundertdreiundwanzig |
| ng:spellOutNumber(123,'dk-DK') | hundrede og treogtyve |