A price has an amount and a currency. The shopper's language decides how it is written: digits, separators, grouping and where the symbol goes. Changing the language never converts the currency.
The same price in different languages#
Language |
INR 1234567.89 |
INR 0.00 |
INR -1234567.89 |
|---|---|---|---|
|
₹1,234,567.89 |
₹0.00 |
-₹1,234,567.89 |
|
₹12,34,567.89 |
₹0.00 |
-₹12,34,567.89 |
|
1 234 567,89 ₹ |
0,00 ₹ |
-1 234 567,89 ₹ |
|
1.234.567,89 ₹ |
0,00 ₹ |
-1.234.567,89 ₹ |
|
₹ 1'234'567.89 |
₹ 0.00 |
₹-1'234'567.89 |
|
1,234,567.89 ₹ |
0.00 ₹ |
-1,234,567.89 ₹ |
|
1,234,567.89 ₹ |
0.00 ₹ |
-1,234,567.89 ₹ |
|
₹۱٬۲۳۴٬۵۶۷٫۸۹ |
₹۰٫۰۰ |
−₹۱٬۲۳۴٬۵۶۷٫۸۹ |
|
₹12,34,567.89 |
₹0.00 |
-₹12,34,567.89 |
|
১২,৩৪,৫৬৭.৮৯₹ |
০.০০₹ |
-১২,৩৪,৫৬৭.৮৯₹ |
|
₹1,234,567.89 |
₹0.00 |
-₹1,234,567.89 |
Every supported language is in the language reference.
Decimal places#
Each currency has its own number of decimal places: two for INR and USD, none for JPY, three for KWD. Some currencies display fewer than they store; IDR stores two and displays whole rupiah.
Currency |
Accepted amount |
Displayed in English |
|---|---|---|
INR |
|
₹1,234.56 |
JPY |
|
¥1,234 |
KWD |
|
KWD 1,234.567 |
IDR |
|
Rp 1,235 |
Every currency is in the currency reference.
{{ product.price.current | money }} {# ₹1,850.00 #}
{{ product.price.current | money: trim_zeros: true }} {# ₹1,850 #}
A price always shows its currency's decimal places. Add trim_zeros: true to leave them out when the amount is whole. This changes only how the price is written, never the amount charged.
Prices in a theme#
{{ product.price.current | money }}
{% if product.price_range.has_range %}
{{ product.price_range.min | money: isolate: true }} – {{ product.price_range.max | money: isolate: true }}
{% else %}
{{ product.price.current | money: isolate: true }}
{% endif %}
money takes a price value, such as product.price.current, and formats it in the shopper's language. A plain number, a missing currency or more decimal places than the currency allows is an error. Never build a price by joining a symbol and a number.
Right-to-left languages#
Storefront pages set dir="rtl" on the html element for right-to-left languages. Use CSS logical properties such as margin-inline-start so the layout works in both directions, and keep the formatted price as it is.
When a price sits inside translated text or next to punctuation, use money: isolate: true. It keeps the whole price together when left-to-right and right-to-left text mix.
Check negative prices, currency codes and line wrapping in both directions.
The shopper's language#
localization.locale is the active language, and localization.available_languages lists the store's languages with their code, name and rtl flag. Choosing a country can also change the currency. See Locale, country, and currency.
Translate labels such as "Subtotal" with the t filter and your theme locale files.