Index
Video Courses
Watch structured video courses
Knowledge Base
Visit our User Forum for discussions & solutions
LocationAwareCurrencyToWords
Render a numeric amount as a currency in words, depending on the locale
The LocationAwareCurrencyToWords function is, as the name suggests, both location‑ and language‑aware. It converts a numeric value into words and automatically applies the appropriate currency based on your PC’s regional settings (Desktop) or language (Browser). These settings can be overwritten.
- On Desktop: Go to XpressDox Ribbon > Settings > Language
- On Cloud: Go to Manage > My Profile > UI Language and Regional Format
This differs from built-in functions such as Dollars, EuroDeutsch, and EurosFrancaise which always return those specific currencies regardless of the locale. It also differs from the NumberToCurrency function, where the currency must be explicitly specified. LocationAwareCurrencyToWords removes that need entirely by reading the locale automatically.
For example, if the value is 10000:
- With the location set to United States, the result will be: ten thousand dollars
- With the location set to another region (for example, France), the result will be dix mille euros
How it works:
The output of this function depends on your current language and regional format settings. When you change these settings, XpressDox automatically adjusts the currency wording to match the selected location. No changes to the template are needed.
Why it is useful:
LocationAwareCurrencyToWords is ideal when the same template is used across multiple countries or regions. Instead of maintaining separate templates for each currency, a single template can serve all regions and will produce the correct currency wording for each user automatically.
Command format:
The function takes two parameters:
| Data Element | The data element in your template containing the numeric value (e.g. Amount) |
| Case option | Controls the capitalisation of the result (e.g. ToUpper or ToLower) |
Examples:
«LocationAwareCurrencyToWords(Amount,'leave')»
«LocationAwareCurrencyToWords(Amount,'ToUpper')»