Skip to content

createContextMoneyFormatter

createContextMoneyFormatter(opts): (money) => string

Defined in: .pnpm/@[email protected]_graphql@[email protected]_typescript@6.0.3/node_modules/@storesynk/core/dist/money-format.d.ts:22

Context-aware formatter for storefronts with a market picker. Shopify’s moneyFormat is the shop-primary-currency template - its hardcoded symbol is wrong for foreign presentment currencies. Amounts in the shop currency (or with no currencyCode) keep going through createMoneyFormatter, byte-identical to the SSR transform (which always renders the default context); foreign currencies fall back to Intl currency formatting in the buyer’s locale.

string

Language code, Shopify enum style (“EN”, “PT_BR”) or BCP 47.

string

string

(money) => string