Nova · i18n
Formatting
No book can hold a price or a date either. Those are written for a region where they are made, by Prism, with the region named. Words go by language and formatting by region: the same amount in the same currency is written three ways across three countries that share a language.
{
id: 'i18n-formatting',
data: { price_cents: 8900 },
layout: {
component: 'Stack',
children: [
{
component: 'Badge',
props: {
label: {
$prism: {
$localeMoney: {
value: { $ref: '$.price_cents' },
currency: 'EUR',
locale: 'de-AT',
},
},
},
},
},
{
component: 'Badge',
props: {
label: {
$prism: {
$localeMoney: {
value: { $ref: '$.price_cents' },
currency: 'EUR',
locale: 'de-DE',
},
},
},
},
},
{
component: 'Badge',
props: {
label: {
$prism: {
$localeMoney: {
value: { $ref: '$.price_cents' },
currency: 'EUR',
locale: 'de-CH',
},
},
},
},
},
],
},
}Nothing. It is only drawn.
{ price_cents: 8900 }€ 89,00 89,00 € EUR 89.00
Runs in this page on the installed package. The input and the expected output are defined by the example.