Skip to main content

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> and dir
  • canonical URLs, hreflang, and sitemap entries
Shopify can accept an unsupported country, language, or currency context and silently return the default market. Enable every configured combination in Shopify Admin, then read back the Storefront API localization and currency before launch.

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.
Do not copy Pilot’s full reference market list. Add only combinations that the merchant has enabled in Shopify Markets and that the storefront has verified by read-back.

Derive the Weaverse Theme Schema

Use the same table in the theme schema instead of maintaining another locale list.
Weaverse currently supports path-based localization. Keep subdomain or top-level-domain routing out of this configuration unless your application implements and verifies that architecture separately.

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:
  1. Open the page in Weaverse Studio.
  2. Choose a configured market from the market selector.
  3. Create the localized page when prompted.
  4. Edit and publish that market’s content.
  5. Use Reset to default only when you intend to discard the localized page and return to default content.
If the selector is unavailable, verify 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:
  1. Live Studio design override — the current preview edit.
  2. Persisted Translation Manager override — merchant-authored.
  3. 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.
  4. Bundled/static market translation — ships with the theme and is the final fallback.
Presence is authoritative, including an explicit empty string. Check whether a source owns the key; do not use truthiness or ||, which would replace an intentional empty value with fallback copy.

AI-Agent Setup Boundary

A shop-scoped WEAVERSE_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.
The Admin API Proxy is limited to 1,000 requests per hour per token and a 15-second query timeout. See Shopify Admin API Proxy, Weaverse MCP, and Content API for the verified authentication, scope, route, and write contracts.

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-us or /collections/hi-in-picks remain 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 .data requests retain the active market.
  • Confirm cart buyer identity and checkout remain in the selected country and currency.
  • Render the selected market’s hreflang as <html lang> and set dir="rtl" for RTL markets.
  • Emit a self-canonical URL and only the hreflang alternates 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.