Overview
Shopify Markets helps merchants expand their business to a global audience by creating shopping experiences in local languages and currencies. Weaverse provides a streamlined solution for creating and managing multilingual storefronts. This guide walks you through the process of setting up localization in your Hydrogen theme with Weaverse, allowing you to customize content for various markets and audiences.Quick Demo
For a quick overview of the localization process, watch this video demonstration:
Prerequisites
Before implementing localization, ensure your project is up-to-date with the latest versions of the Hydrogen library and the@weaverse/hydrogen package:
Implementation Steps
Step 1: Add a Country Selector
Follow Shopify’s Country Selector guide to integrate aCountrySelector component into your Hydrogen storefront. This feature allows users to switch between markets and languages seamlessly.
Step 2: Configure Localization in the Weaverse Theme Schema
Update your theme schema to include localization settings. Modify theschema.server.ts file to define i18n configurations:
i18n object contains the following properties:
-
urlStructure: Defines the URL structure for localized content. Options include:url-path: Uses path prefixes (e.g.,/en-us,/fr-ca) for different locales.subdomain: Uses subdomains (e.g.,en.example.com,fr.example.com).top-level-domain: Uses top-level domains (e.g.,example.fr,example.de).
url-pathstructure. The other two options are under construction and will be available in future releases soon. -
shopLocales: An array of locale objects, each containing:language(Required): The language code (e.g.,en,fr).country(Required): The country code (e.g.,US,CA).pathPrefix(Optional, Recommended): An optional path prefix for the locale. It helps in better navigation inside Weaverse Studio. If not provided, it will be computed based on thelanguageandcountrycodes.label(Optional): An optional label for the locale, which can be used for display purposes.
Step 3: Manage Localized Content in Weaverse Studio
After integrating theCountrySelector component and configuring the theme schema, use Weaverse Studio to manage localized content effectively:
a. Switch Between Markets/Locales
- Open your site in Weaverse Studio.
- Use the Country Selector to switch to the desired market or locale.

- You will be prompted to create a localized version of the selected page.
i18n object in your theme schema. Please refer to the previous step to set it up.
b. Create Localized Pages
- When switching to a new market, a modal will appear prompting you to create a localized version of the current page.
- Click on “Create localized page” to generate a specific version for the chosen market.
-
Localized pages are independent of the default version, ensuring changes apply only to the selected locale and you can revert to the default version at any time.
-
If the modal does not appear, you can manually click on the “Create localized page” button next to the Country Selector in the top bar of Weaverse Studio.
c. Revert to Default Content
- If you want to revert a localized page to the default version, you can do so easily.
- Open the localized page in Weaverse Studio.
-
Click on the “Reset to default” button next to the Country Selector.
-
A confirmation modal will appear. Click “Reset” to confirm the action.
Please note that this action cannot be undone.
Benefits of Markets/Localization
Using Weaverse’s localization capabilities, you can:- Deliver market-specific content while maintaining a global default version.
- Easily manage and update localized content for specific markets.
- Preview localized storefronts to ensure alignment with audience preferences.
- Revert localized pages to default content when necessary.
Technical Implementation
While the Studio workflow above covers the visual management of localized content, understanding the technical implementation helps developers customize and extend localization functionality.How Locale Detection Works
Weaverse automatically determines the current locale through your theme’s i18n configuration and Hydrogen’s storefront context. TheloadPage() function uses this information to fetch the appropriate localized content.
Connection between theme schema and loadPage():
Explicit Locale Control
For advanced use cases, you can explicitly specify the locale inloadPage():
- Custom routing logic determines locale
- Loading content for a different locale than the current page
- Background jobs or admin tools
- Cross-locale content comparison
Locale Format Standards
Weaverse uses the standardlanguage-country format (lowercase, hyphen-separated):
- Format:
language-country(e.g.,sv-se,fr-ca,de-de) - Language: ISO 639-1 code (2 letters)
- Country: ISO 3166-1 alpha-2 code (2 letters)
sv-se- Swedish (sv) in Sweden (se)fr-ca- French (fr) in Canada (ca)en-gb- English (en) in United Kingdom (gb)
Limitations of Single-Project Approach
While the single-project approach works well for most use cases, it has some limitations:- No per-locale theme settings: Global theme settings (colors, fonts, layouts) apply to all locales
- URL structure constraints: Best with
url-pathstructure (/sv-se/...); limited support for subdomains or top-level domains - Shared page routing: All locales share the same page structure and navigation
Alternative: Multi-Project Architecture
For advanced localization requirements, Weaverse supports a multi-project approach where each market or locale has its own dedicated project. When to use multi-project:- Different branding or theme settings per market
- Top-level domain structure (mystore.se, mystore.fr)
- Market-specific page structures
- A/B testing different configurations
- Create your original project and develop your storefront
- Duplicate the project in Weaverse Studio for each market/locale
- Customize each project independently (content, theme settings, pages)
- Use
projectIdlogic to route to the appropriate project based on domain or custom criteria - Import/export content between projects as needed for coordination
- Independent global theme settings per market
- Different page structures and navigation per locale
- Support for any URL structure (top-level domains, subdomains, custom routing)
- Complete Studio isolation per market
- A/B testing and staged rollouts
See the Multi-Project Architecture Guide for comprehensive documentation on multi-project setup, including A/B testing, multi-brand storefronts, advanced routing patterns, and step-by-step migration guides.