Dates, times, numbers and currencies look differently in different parts of the world.

The same number may look like 1,250.50 in the US and like 1.250,50 in Germany.

If you want Ultradox to work with numbers e.g. to sum up both numbers you may get into trouble if you do not specify the locale (=the language and country) that has been used to format the numbers in the first place.

Ultradox helps you to deal with the these challenges, but it is important that you understand the basic concepts, so read this guide carefully.

Default settings

You can adjust the default settings for the file you are working on in the File > Settings… menu.

These settings will be used by default, if you use numbers, dates or currencies into your templates and do not specify the locale in the merge tag.

Input locale

The input locale will be used when Ultradox tries to make sense from given numbers, dates or currencies.

Let’s say you have a variable called betrag with the value 1.250,50. It is a number, but it is formatted in the “German way”.

First of all make sure that you know how the raw data looks like by using the debugger or by printing the value to the console without any formatting:


You will get the unformatted value:


If your default input locale is set to English and you print the variable to the console using the number renderer ...


… you may get an unexpected result


Why is that?

As Ultradox tries to understand the given value 1.250,50 using English formatting rules, it will take the first dot as the decimal delimiter and ignores everything after the comma.

The converted number is 1.25 and that’s what gets printed to the console.

If you set the default input locale to German Ultradox will understand the number correctly and you will see a different result:


But what if you have some variables containing numbers in German and others in English format?

If you switch back your default input locale to English, you can still set the input locale on each merge tag. It will then not use the default input locale, but the specified input locale instead:


Gives to correct number, even though the default input locale is set to English:


The same logic applies to given dates and currencies.


Rendering "betrag" as number with default input locale (en):
Set input local to German to parse "betrag"
"betrag" : "1.250,50"


Output locale

Let’s say you want to print the current date and time. If you just log


to the console, you will get an output like this:

Thu Sep 20 08:48:13 UTC 2018

This is just printing the raw date and time and does not look not very nice.

Let’s use the datetime renderer to improve the formatting.


to the console, you will get an output like this if your default output locale is set to English:

Thursday, September 20, 2018 11:11:07 AM UTC

If you set your default output locale to German, you will get a different result:

Donnerstag, 20. September 2018 11:11 Uhr UTC


Change the output locale and output pattern to modify the emitted date.

Dates and times look differently in different languages

Formatted dates can even vary in different countries speaking the same language
"date" : "2018-01-12T15:00:00.000Z"


Time zone

You have learned how to print dates and times using the formatting rules of different locales.

By default they will be printed in the specified default timezone, which in our example has been set to UTC.

If you set the default timezone to Pacific Standard Time instead, when printing the current date and time...

${now;datetime(op=full)} will get a different output with the correct time accordingly

Thursday, September 20, 2018 4:20:40 AM PDT

You can specify the output time zone in your merge tag to override the default settings and to print the same correctly for different time zones and languages like this:


You will get the correct dates and times reflecting the formatting rules of the specified locale and time zone:

Donnerstag, 20. September 2018 13:25 Uhr MESZ
Quinta-feira, 20 de Setembro de 2018 08h25min41s BRT


Feel free to adjust the various parameters of the datetime renderer to get the desired result

Same time, different timezones
"date" : "2018-04-12T15:00:00.000Z"



When formatting numbers with the currency renderer, the configured default currency will be used.

Let’s say you have a variable called amount with the value 1,250.50 and your default output locale is set to English (US) and the currency is set to EUR (Euro), printing this variable using the currency renderer…


...will generate output reflecting the configured default currency and output locale:


Switching the default output locale to Italian will generate a different output:

€ 12.505,00


Did you know that formatting currencies in Euro looks like this in the UK
while it looks like that
in the US?

In Germany it looks like this
while it looks like this
in Switzerland
"amount" : "1,250.50"


Learn more

The following guides will cover the aspects of the templating language.

Questions and Feedback

If you have any comments on this page, feel free to add suggestions right to the Google document that we are using to create this site.

If you are not yet member of the Ultradox community on Google+, please join now to get updates from our end or to provide feedback, bug reports or discuss with other users.

Last Updated: 1/3/20