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.

The action, as it is written
{
  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',
              },
            },
          },
        },
      },
    ],
  },
}
What is done to it
Nothing. It is only drawn.
What it then holds
{ price_cents: 8900 }
What it then says
€ 89,00
89,00 €
EUR 89.00
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.