Overview
A localized storefront is one routing and commerce system, not a set of unrelated language pages. Define each market once, then derive every localized surface from that definition:- URL prefixes and the exact set of supported market routes
- Shopify Storefront API country and language context
- Weaverse locale and localized page data
- links, redirects, and React Router data requests
- cart buyer identity and checkout continuity
<html lang>anddir- canonical URLs,
hreflang, and sitemap entries
Configure Only Markets You Sell In
Start with a small canonical table. The unprefixed entry is the default market; every other prefix is an exact, lowercase/{language}-{country} route.
Derive the Weaverse Theme Schema
Use the same table in the theme schema instead of maintaining another locale list.Reuse the Table at Runtime
Resolve the active market at the request boundary from this same exact allowlist. The selected entry drives every surface listed in the overview, including the public locale Weaverse uses for localized content and Translation Manager keys. Some providers use a language enum that differs from the public BCP-47 identity. Keep provider-specific fields on the market entry; never derive a public URL or Weaverse locale from a provider enum. See Advanced Localization for the routing, continuity, and SEO contract.Manage Localized Content in Studio
After the theme schema exposes the configured markets:- Open the page in Weaverse Studio.
- Choose a configured market from the market selector.
- Create the localized page when prompted.
- Edit and publish that market’s content.
- Use Reset to default only when you intend to discard the localized page and return to default content.
themeSchema.i18n and confirm the selected market exists in the canonical table.
Understand Translation Sources
Four sources can own a translated key. Highest precedence first:- Live Studio design override — the current preview edit.
- Persisted Translation Manager override — merchant-authored.
- Genuine legacy merchant setting — a value customized before migration. A stored value still equal to the theme’s shipped default is not merchant intent and falls through.
- Bundled/static market translation — ships with the theme and is the final fallback.
||, which would replace an intentional empty value with fallback copy.
AI-Agent Setup Boundary
A shop-scopedWEAVERSE_API_KEY can authenticate Weaverse Content API/MCP capabilities and the Shopify Admin API Proxy when it is a shopify or content_api token. The proxy uses the connected Weaverse app installation and only its currently granted Shopify scopes; it is not unrestricted Shopify access. agent_cli tokens cannot authenticate the proxy.
1
Protect the key
Keep the key in a dedicated, untracked server environment file with owner-only
0600 permissions. Configure the agent runtime to read that file. Never print the value or paste it into a prompt, command line, documentation, diff, or log.2
Verify identity and scopes
Call the Weaverse MCP
whoami tool first. For Shopify authority, make a harmless authenticated POST https://studio.weaverse.io/api/admin-graphql read for shop {name primaryDomain {url}} and currentAppInstallation {accessScopes {handle}}. Confirm the expected shop and minimum required scopes before continuing; a successful token lookup alone proves neither.3
Inventory before changing
Use
list_projects, list_languages, list_pages, get_page, and get_theme_settings for Weaverse state. Use reviewed Admin GraphQL reads for current Shopify state. Compare the results with the canonical market table before proposing any mutation.4
Review and apply exact mutations
Produce a resource-by-resource plan. Use only a current, schema-verified operation covered by the installed scopes; prefer repeatable writes that are no-ops when the desired state already exists. Obtain explicit approval immediately before destructive, permission, publication, or other high-impact changes. Treat every HTTP/proxy failure—including the sanitized
500 used for top-level GraphQL errors—as a failed operation. For HTTP 200 mutations, inspect operation-specific userErrors, then read back the exact resource.5
Handoff and verify
Do not claim that Shopify Markets combinations or Customer Account logout URIs are API-mutable unless the exact current Admin GraphQL operation is verified. Hand unproved steps to an authorized Shopify Admin operator. Translation Manager sync and publish remain a Studio step and require explicit approval. Once both systems are configured, work through the Production Checklist below.
Production Checklist
Before launch:- Enable every configured country, language, and currency in Shopify Admin.
- Read back each combination from the Storefront API; remove any market that resolves to the default instead of the requested context.
- Confirm unsupported exact locale-shaped prefixes return 404 while ordinary slugs such as
/about-usor/collections/hi-in-picksremain valid. - Confirm market switches preserve the intended path and query and perform a document navigation so stale Weaverse data is not reused.
- Confirm links, redirects, and React Router
.datarequests retain the active market. - Confirm cart buyer identity and checkout remain in the selected country and currency.
- Render the selected market’s
hreflangas<html lang>and setdir="rtl"for RTL markets. - Emit a self-canonical URL and only the
hreflangalternates whose equivalent routes are known to exist. Omit uncertain alternates. - Register the storefront origin and every served market home URI as allowed Customer Account post-logout URIs. Keep the authentication callback unlocalized.
- After deploying the corrected theme, sync and publish the intended keys and overrides in Translation Manager.