i18n
Translations, theme texts, the store's languages and the one formatter.
On this page
import { … } from '@poltura/theme-sdk/i18n';
| Name | What it is |
|---|
useTranslations | The platform's own texts, the strings the storefront ships for every theme. |
useRichTranslations | Platform texts whose marked passages the theme draws, such as the terms and privacy links in the sign-up consent. |
useLocale | The language the page renders in. |
useNow | The current time, the same on the server and in the browser for the first render. |
useTimeZone | The store's time zone, which every store date renders in. |
useThemeText | The theme's own texts in the page language, live while the merchant edits them. |
useFormat | The formatter for the page language and the store's time zone. |
useLocales | The page language and the other languages the storefront offers, for a language switcher. |
| Name | What it is |
|---|
Locale | A language the store's storefront is available in. |
NameOrder | The order a person's given and family names are written in. |
TextValues | Values filled into the placeholders of a text. |
Translator | One platform text by key, with its placeholders filled. |
RichTextValues | Values for a text with marked passages: plain values fill placeholders, functions wrap the passage between <name> and </name>. |
RichTranslator | One platform text by key, its placeholders filled and its marked passages drawn by the given functions. |
ThemeText | One of the theme's own texts by dotted key, with placeholders and ICU plurals resolved. |
MoneyFormatOptions | How Formatter writes an amount of money. |
Formatter | Formats numbers, money, dates and lists in the page language and the store's time zone. |
Locales | The page language and every language the storefront offers. |
Last updated