docs/developer/core-concepts/translations.mdx
Spree supports two types of translations:
For configuring which locales and currencies are available in your store, see Markets. Markets control locale and currency assignment per geographic region.
Resources with user-facing content fields have built-in support for translations. Each translatable resource has a corresponding translations table in the database — for example, product translations are stored in spree_product_translations.
erDiagram
Product ||--o{ ProductTranslation : "has many"
Taxon ||--o{ TaxonTranslation : "has many"
Store ||--o{ StoreTranslation : "has many"
Product {
string id PK
string status
}
ProductTranslation {
string id PK
string product_id FK
string locale
string name
text description
string slug
string meta_title
string meta_description
}
TaxonTranslation {
string id PK
string taxon_id FK
string locale
string name
text description
string permalink
}
| Resource | Translatable Fields |
|---|---|
| Product | name, description, slug, meta_description, meta_keywords, meta_title |
| Taxon | name, description, permalink |
| Taxonomy | name |
| Option Type | presentation |
| Option Value | presentation |
| Property | presentation |
| Product Property | value |
| Store | name, meta_description, meta_keywords, seo_title, facebook, twitter, instagram, customer_support_email, description, address, contact_phone |
To retrieve translated content, pass the locale via the X-Spree-Locale header or the SDK locale option:
// Fetch product in French
const product = await client.products.get('spree-tote', {
locale: 'fr',
})
product.name // "Sac Spree"
product.description // "Un sac fourre-tout élégant..."
product.slug // "sac-spree"
// List categories in German
const { data: categories } = await client.categories.list({}, {
locale: 'de',
})
# Fetch product in French
curl 'https://api.mystore.com/api/v3/store/products/spree-tote' \
-H 'Authorization: Bearer pk_xxx' \
-H 'X-Spree-Locale: fr'
Slugs are also localized — a product can have different slugs per locale. See Slugs for details.
Translations are managed in the Admin Panel. When editing a product, taxon, or other translatable resource, switch the locale selector to enter content in each language.
Translations can also be managed via the Admin API.
Spree stores UI translation strings in a separate project: Spree I18n. This is a community-maintained project with locale files for 43+ languages.
To install UI translations:
bundle add spree_i18n
Once installed, all translation files are available automatically — no need to copy any files.
<Info> The full list of supported locales is available in the [Spree I18n GitHub repository](https://github.com/spree-contrib/spree_i18n/tree/main/config/locales). </Info>