# Types (/themes/sdk/reference/i18n/types)

```ts
import { … } from '@poltura/theme-sdk/i18n';
```

## `Locale` [#locale]

A language the store's storefront is available in.

<TypeTable type={{"tag":{"description":"The BCP 47 tag, such as `hu-HU`.","type":"string","required":true},"language":{"description":"The language subtag, such as `hu`.","type":"string","required":true},"country":{"description":"The country subtag in upper case, or null for a language without one.","type":"CountryCode | null","required":true},"label":{"description":"The language's own name for itself, such as `Magyar`.","type":"string","required":true},"nameOrder":{"description":"The order names are written in this language.","type":"NameOrder","required":true}}} />

## `NameOrder` [#nameorder]

The order a person's given and family names are written in.

```ts
type NameOrder = 'givenFirst' | 'familyFirst'
```

## `TextValues` [#textvalues]

Values filled into the placeholders of a text.

```ts
type TextValues = Readonly<Record<string, string | number>>
```

## `Translator` [#translator]

One platform text by key, with its placeholders filled.

```ts
type Translator = (key: string, values?: TextValues) => string
```

## `RichTextValues` [#richtextvalues]

Values for a text with marked passages: plain values fill placeholders, functions wrap the passage between `<name>` and `</name>`.

```ts
type RichTextValues = Readonly<Record<string, string | number | ((chunks: ReactNode) => ReactNode)>>
```

## `RichTranslator` [#richtranslator]

One platform text by key, its placeholders filled and its marked passages drawn by the given functions.

```ts
type RichTranslator = (key: string, values?: RichTextValues) => ReactNode
```

## `ThemeText` [#themetext]

One of the theme's own texts by dotted key, with placeholders and ICU plurals resolved.

```ts
type ThemeText = (key: string, values?: TextValues) => string
```

## `MoneyFormatOptions` [#moneyformatoptions]

How [`Formatter`](/themes/sdk/reference/i18n/types#formatter) writes an amount of money.

<TypeTable type={{"display":{"description":"`symbol` writes `Ft` or `€`, `code` writes `HUF` or `EUR`; screens use the symbol.","type":"'symbol' | 'code'","required":false},"zeroLabel":{"description":"The text shown instead of a zero amount, such as `Free`.","type":"string","required":false}}} />

## `Formatter` [#formatter]

Formats numbers, money, dates and lists in the page language and the store's time zone.

<TypeTable type={{"money":{"description":"An amount of money, such as `12 990 Ft`; empty while prices are hidden from the visitor.","type":"(value: Money, options?: MoneyFormatOptions) => string","required":true},"number":{"description":"A number with the language's separators.","type":"(value: number, options?: Intl.NumberFormatOptions) => string","required":true},"percent":{"description":"A percentage from its number, so `27` writes `27%`.","type":"(value: number) => string","required":true},"date":{"description":"A calendar date in the store's time zone.","type":"(value: Date | string, options?: Intl.DateTimeFormatOptions) => string","required":true},"dateTime":{"description":"A date with its time of day in the store's time zone.","type":"(value: Date | string, options?: Intl.DateTimeFormatOptions) => string","required":true},"relativeTime":{"description":"How long ago or from now an instant is, such as `3 minutes ago`.","type":"(value: Date | string, now?: Date) => string","required":true},"list":{"description":"A list joined the language's way, such as `a, b and c`.","type":"(values: readonly string[], options?: Intl.ListFormatOptions) => string","required":true},"calendarYear":{"description":"The current year in the store's time zone.","type":"() => number","required":true}}} />

## `Locales` [#locales]

The page language and every language the storefront offers.

<TypeTable type={{"current":{"description":"The language the page renders in.","type":"Locale","required":true},"available":{"description":"Every language the storefront offers, the current one included.","type":"readonly Locale[]","required":true}}} />
