LocalizeOrdinal (open)

Get the ordinal value of a numerical value

Syntax

LOADLIB "wh::util/localization.whlib";

STRING FUNCTION LocalizeOrdinal(INTEGER64 value, STRING locale)

Parameters

INTEGER64 value

The number to get the ordinal value for

STRING locale

The language or locale to use (e.g. 'en', 'en-GB', 'nl' or 'zh-Hans-CN')

Return value

STRING

The formatted value

Examples

// example1 = "12,345th"
STRING example1 := LocalizeOrdinal(12345, "en");

// example2 = "12.345e"
STRING example2 := LocalizeOrdinal(12345, "nl");

// example3 = "12.345."
STRING example3 := LocalizeOrdinal(12345, "de");