num2word

Purpose

Converts numeric type arguments (integer and fractional) to numbers written in words.

Syntax

num2word($group)

Arguments

Requires a single argument of an integer or string value (named group).

The function also takes the optional named parameter language that sets the language in which the entry is generated.

All available languages are supported: Arabic, Chinese, Chinese-Traditional, Dutch, English, French, German, Greek, Italian, Japanese, Korean, Polish, Portuguese, Russian, Spanish, Thai, Turkish.

By default, the language in which the entry is generated is determined by the language of the target dataset column.

Returned Value

A number written in words.

Examples

Example 1

Dataset

XPDL-rule

Result

40

rule: r1

{

query: {number()}:m

result: Str = num2word($m, language:=Spanish)

}

cuarenta

20,5

veinte coma cinco

29,9

veintinueve coma nueve

0,5

cero coma cinco

Example 2

Dataset

XPDL-rule

Result

20,5

rule: r1

{

query: {number()}:m

result: Str = num2word($m)

}

twenty point five

29,9

twenty-nine point nine

0,5

zero point five

0,1

zero point one