# Price format

Price format (also known as currency template) is used to define the way how prices should be displayed. The template can be set globally (in manifest `config` object) and then it can be overridden in various parts of an application (for example, in translations).

> **Default currency template:** `(currency) (amount)`

Example webapp manifest

```json
{
  "version": "1.0",
  "schema": {
    "config": {
      "currency_template": "(currency) (amount, 1.2-2, ',', ' ')"
    }
  }
}
```

There might also be case where currency symbol should be used, in that case, currency in configuration should not be changed, instead "currency" in `currency_template` should be replaced with "currencySymbol". Angular will automatically transform currency to symbol.

For example to get output like "1 234,56€" config should look like so:

```json
{
  "version": "1.0",
  "schema": {
    "config": {
      "currency_template": "(amount, 1.2-2, ',', ' ')(currencySymbol)"
    }
  }
}
```

Configuration string in most cases looks like this `(currency) (amount, 1.2-2, '.', ' ')` where:

* **`currency`** represents currency variable for example "EUR", "USD" etc.
* **`currencySymbol`** represents monetary value as a symbol transformed from currency variable with [getCurrencySymbol](https://angular.io/api/common/getCurrencySymbol) method. In "EUR" case it would be "€" etc.
* **`amount`** represents monetary value and it's format configuration sequence separated by comma (,). If some of the values use comma (,), space ( ) or quotes ("|'), then those values should be wrapped in differing quotes e.g. `","`,`"'"`, `'"'`:
  * **`DigitsInfo`** decimal representation options, specified by a string in the following format:{minIntegerDigits}.{minFractionDigits}-{maxFractionDigits}. *e.g.: `1.2-2`*
  * **`DecimalSeparator`** separator symbol for decimal point. *e.g.: `","`*
  * **`ThousandsSeparator`** separator symbol thousands. *e.g.: `"'"`*

## Customize price format on `Content` (translation) level with `asCurrency` transformer.

Sometimes there is a requirement to have a different price format in a specific content string. More information how this can be done is found in [translations](/kasko-frontend-documentation/core-concepts/translations.md) guide.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kasko.io/kasko-frontend-documentation/core-concepts/configuration/configuring-price-format.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
