Overview

Provides access to currency formatting settings as set up in the website’s admin.

Rendering this object directly returns a JSON representation of the settings.

You can also access each property individually.

Properties

currency_formatting_settings.unit

Returns the unit (currency sign).

Example: $, , ...

currency_formatting_settings.format

Returns the format string used for formatting non-negative amounts.

The %u placeholder represents the unit, and the %n placeholder represents the amount.

currency_formatting_settings.negative_format

Returns the format string used for formatting negative amounts.

The %u placeholder represents the unit, and the %n placeholder represents the amount.

currency_formatting_settings.precision

Returns the number of decimals to which the amount is rounded to when formatting.

currency_formatting_settings.separator

The separator between the main and decimal part.

currency_formatting_settings.delimiter

The character that delimits digits between thousands.