Translation Feature Guide
This guide introduces the newTranslation Manager and shows how to set it up, translate your content, and apply it to a project.
Overview
Translation Manager helps you localize two kinds of content inside a Weaverse project:
Theme content: reusable storefront strings like button labels, empty states, and helper text.Page content: text and image content extracted from page sections, blocks, and elements.
[!TIP] Always ensure your default locale content is fully polished before translating to save time and reduce errors across supported languages.
Before You Start
Make sure these pieces are in place before your team starts translating:- You have installed
@weaverse/hydrogenversion^5.12.0or higher in yourpackage.json. - Your project has a valid default locale configured.
- The latest page content is published.
- Your theme exposes reusable strings through
schema.i18n.staticContentif you want to translate theme-level text.
- The first time
Translation Manageropens, it auto-creates the default language from the project’s default locale. - Page scans read from the last published version of the project, not from unpublished editor changes.
- Theme-level translation keys come from the theme schema, so they need to exist there before they can be synced and translated.
Theme Setup
If your project needs translatable theme strings, create a file attheme/i18n/default.json (or your preferred location) to store your keys:
i18n.staticContent. You must also set i18n.translation: true to enable and display the Translation Manager in Studio.
- Keep keys structured in a multi-nested object format.
- Use stable keys that describe the UI meaning, not the current copy.
- Treat these default values as the source language content for your project.
Open Translation Manager
In Studio, click the language icon to openTranslation Manager.
On first open, the feature will:
- Detect the project’s default locale.
- Create the default language record if it does not exist yet.
- Load the current language, theme content, and page content.
Theme language changed warning with a Re-sync Keys action.
Add a New Language
To add a translation target:- Click
Add Language. - Choose the target locale you want to support.
- Choose the source locale for that new language.
- Default locale:
en-us - New language:
fr-fr - Source locale:
en-us
Translate Theme Content
Use theTheme tab for project-wide UI strings.
Default language mode
When the selected language is the default language:- Click
Sync Theme Keysto import keys fromschema.i18n.staticContent. - Edit the default values directly.
- Changes save automatically.
Translation mode
When the selected language is not the default language:- Open the
Themetab. - Review the source values on the left.
- Enter translated values on the right.
- Use
Auto-Translateto generate first-pass translations. - Refine any strings that need tone or brand adjustments.
Translate Page Content
Use thePage tab for page-specific content.
- Switch to
Page. - Pick the page you want to translate from the sidebar.
- Choose
Text ContentorImage Content. - Edit translated values inline.
- Use filters like
Untranslatedto focus on missing content.
Auto-Translate:
- Select the current page to translate one page.
- Select multiple pages to run a background translation job.
- Track long-running jobs from the notification panel.
How Translations Apply To The Project
The feature applies translations in two different ways:- Theme content: Stored as project translation keys. You must use the
useThemeTexthook (as detailed below) in your frontend components so that these strings are rendered dynamically based on the active locale. - Page content: Stored separately from the main page JSON. Weaverse automatically applies these localized strings at runtime. You do not need to add any code, hooks, or rendering logic to your Weaverse sections—Weaverse Hydrogen components automatically display the translated text when a non-default locale is requested.
Recommended Workflow
For the smoothest rollout, use this order:- Finalize the default-language content first.
- Publish the latest page changes.
- Sync theme keys.
- Add the target language.
- Auto-translate theme content.
- Auto-translate page content.
- Review high-visibility strings manually.
- Preview the localized storefront and QA important flows.
Common Notes
Translation Manageronly works well when the default locale is correct.- If a page was changed but not published, the scan will not see that new content yet.
- If theme keys are missing, check that
schema.i18n.staticContentexists and then runSync Theme Keysagain. - If your source language changes, use
Re-sync Keysinstead of recreating all translations.
Rendering Translations in the Theme
To use the translated theme content in your project’s components, you can use theuseThemeText hook provided by @weaverse/hydrogen. This hook automatically connects to your theme’s static content and localized strings managed in the Translation Manager.
- Import the hook:
Import the
useThemeTexthook into your component from the Weaverse Hydrogen library.
- Use the
tfunction to render localized strings: Call the hook to access thetfunction. Then pass your JSON key path to it.
- Using simple string interpolation:
If you need to inject dynamic values into your translations,
useThemeTextnatively supports simple interpolation. Mark variables in your source JSON copy with double braces (e.g.{{name}}), and then pass an object of variables as the second parameter tot:
app/i18n/en.json will automatically render as the localized strings managed in Studio.
Advanced: Pluralization with i18next
By default, thet function from useThemeText only supports simple string substitution (e.g., {{variable}}). It does not natively support advanced formatting like plurals.
If your application requires plural forms or other advanced i18n features, you can configure an i18next instance and pass it as an custom translation function to Weaverse using the withWeaverse wrapper.
For full step-by-step instructions on setting this up, read the dedicated i18next Integration Guide.
Translating Shopify Content
While Weaverse’s Translation Manager perfectly handles your storefront’s theme UI strings and custom page features, your core catalog data (Products, Collections, Blogs, Articles, Menus) natively resides in Shopify. How to Translate Catalog Data: Localize your core Shopify catalog within the Shopify Admin using Shopify’s free Translate & Adapt app or any compatible 3rd-party translation app from the Shopify App Store. How to Query Translated Data: Hydrogen and the Storefront API make retrieving translated catalog data seamless. You do not need to fetch translations separately. You simply ensure your GraphQL queries include the@inContext directive with the localized language and country codes.
context.storefront.query(...)), Hydrogen uses its built-in routing context to automatically pass the correct language prefix (e.g., /fr/products/hoodie). As a result, Shopify immediately returns the translated strings natively, allowing your Weaverse sections to simply render product.title without any additional locale handling!
Summary
UseTranslation Manager when you need a single centralized location to manage both reusable storefront copy and page-level localized content. By setting up the default locale, exposing theme keys via schema.i18n.staticContent, adding target languages, and using the built-in useThemeText hook, you can maintain a seamless, fully localized shopping experience for your buyers directly inside Studio.