One locale list
Keep a single table of the markets you sell in. Every other piece reads from it.Three identities, never interchanged
A market has three identities. Mixing them up is the most common localization bug.
Map Weaverse’s
language + country back to your URL id when you need it. Don’t parse i18n.locale for routing.
Declare markets in the theme schema
The theme schema’si18n is what Studio’s market selector and Translation Manager read. Derive it from the locale list:
urlStructure: 'url-path'tells Studio markets are distinguished by a path prefix.translation: trueturns on the Translation Manager for this theme.staticContentis the theme’s own copy in the default language (see Theme copy).
Route every market
Put rendered routes under a[locale] segment, and keep the default market unprefixed with a proxy (middleware.ts before Next.js 16):
robots and sitemap stay outside the [locale] segment.
Read each request in its market
Give the server client the request’s market inrequestContext.i18n:
- Pass the locale-free pathname. The SDK prepends
i18n.pathPrefix, so Studio sees the same URL as the browser (/de-de/products/...). languageandcountryselect the page Weaverse returns for that market, and they are what component loaders read to query Shopify in the same market. See Data Fetching.- The bridge reads
i18n.language; always seti18n, even for a single-market store.
Translate theme copy
Theme copy is the text your theme renders that merchants don’t author: button labels, empty states, cart messages. Keep it in one object in the default language and register it asstaticContent:
Load the market’s overrides
loadThemeSettings() fetches the active market’s translated copy as merchantOverrides when the theme schema declares i18n and the request context has both language and country. A failed overrides fetch never fails theme settings.
Load it once in the [locale] layout and pass it to the root provider. Extend the client WeaverseRoot wrapper from the Quickstart with the translation props:
staticContent falls back to themeSchema.i18n.staticContent when omitted.
Use t() in components
useTranslation() returns a t() that resolves a key through every source, highest priority first:
- An external
tpassed toWeaverseNextRootProvider(your own i18n library), unless it returns the key unchanged - Live edits from Studio’s Translation Manager (design mode)
merchantOverridesfor the active marketstaticContent- The key itself
useTranslation() must run under WeaverseNextRootProvider (or a TranslationProvider). It also exposes merchantOverrides and translationStore if you build your own translator.
Outside React, for example in generateMetadata, build the same function with createTranslate:
In Studio
- The market selector lists every entry of
i18n.shopLocales. Picking a market loads the preview under itspathPrefix, and merchants can author a localized page per market. - The Translation Manager lists your
staticContentkeys. Edits show live in the preview and are saved as that market’smerchantOverrides.
Next steps
Rendering Pages
Load and render Weaverse pages in App Router routes.
Connect Weaverse Studio
The bridge, route identity and revalidation.
Data Fetching
Read Shopify in the request’s market from component loaders.
API Reference
Translation exports and types.