Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Docs: Clarify/improve documentation around translations
Damian Legawiec0c618e5658fd
diff --git a/docs/developer/core-concepts/translations.mdx b/docs/developer/core-concepts/translations.mdxindex b5d8ae9d3f..dace007ef2 100644--- a/docs/developer/core-concepts/translations.mdx+++ b/docs/developer/core-concepts/translations.mdx@@ -1,21 +1,11 @@---title: Translations-description: Selling in more than one language — translating product content, and translating the interface around it.+description: Selling in more than one language — translating content----## Overview--Two different things need translating, and they're handled separately because they belong to different people.--**Your content** — product names, descriptions, category names — is written by whoever runs the store. Spree stores a version of each field per language.--**The interface** — button labels, error messages, email wording — is written by Spree, and is already translated into dozens of languages by the community.--<Info>-Which languages a region gets is decided by its [Market](/developer/core-concepts/markets). A market sets the default locale alongside the currency, so a visitor from France lands on French prices and French copy without choosing anything.-</Info>--## Translating content+<Note>+ For Dashboard UI translations see [Dashboard Customization: Translations](/developer/dashboard/customization/translations).+</Note>Every translatable record keeps one row per language, so a product genuinely has a French name rather than a French name pasted over the English one.@@ -122,49 +112,6 @@ curl -X POST 'https://api.mystore.com/api/v3/admin/translations/batch' \Asking the API which resources are translatable means a translation tool doesn't need a hardcoded list that goes stale.-## Translating the interface--Spree's own text — transactional emails, API error messages and validation messages — ships translated into 43 languages besides English as part of Spree itself. There is nothing to install. A key that a language does not translate yet is shown in English.--The admin dashboard carries its own translations, separate from these. See [Dashboard translations](/developer/dashboard/customization/translations).--Regional variants such as `de-CH` or `pt-BR` hold only what differs from their base language and fall back to it. Regional English (`en-GB` and the like) falls back to `en`.--### Using fewer languages--Loading every language costs startup time and memory. An app that serves only some languages can list them, and Spree then loads only those, plus English:--```ruby server/config/application.rb-config.i18n.available_locales = [:en, :de, :fr]-```--### Changing a translation--<Tip>-To change what a customer email says, edit it in the dashboard under **Settings → Emails → Templates** instead. Edits apply per store and per language, and need no deploy. See [Templates merchants edit in the dashboard](/developer/customization/emails#templates-merchants-edit-in-the-dashboard) and the [Emails user guide](/user/settings/emails).-</Tip>--Locale files are for the text the dashboard does not edit: API error messages, checkout requirements, validation messages and staff emails. To change a word or add a language, add the key to a locale file in your app. Your file wins over the one Spree ships.--```yaml server/config/locales/de.yml-de:- spree:- checkout_requirements:- email_required: Bitte geben Sie Ihre E-Mail-Adresse ein-```--Every key lives under `spree`. To read one from your own Ruby code, use its full key:--```ruby server/app/services/my_app/checkout_check.rb-I18n.t('spree.checkout_requirements.email_required')-```--<Info>-`Spree.t` still works in 6.0 but is deprecated and will be removed in 6.1. Use `I18n.t` with the full `spree.` key instead.-</Info>--Corrections to the translations Spree ships are welcome as pull requests to the locale files in the [Spree repository](https://github.com/spree/spree/tree/main/spree/core/config/locales).-## Related- [Markets](/developer/core-concepts/markets) — which locale and currency a region getsdiff --git a/docs/developer/upgrades/5.6-to-6.0.mdx b/docs/developer/upgrades/5.6-to-6.0.mdxindex bef963c75c..06d7208b94 100644--- a/docs/developer/upgrades/5.6-to-6.0.mdx+++ b/docs/developer/upgrades/5.6-to-6.0.mdx@@ -1201,7 +1201,7 @@ These Store API fields keep working in 6.0 and are marked `@deprecated` in the S## For extension authors- **Don't reach for model business methods from services** — 6.0 code style writes behavior inline in service/workflow steps; models keep data, validations, predicates and persistence primitives. Extensions patching removed model methods (`finalize!` internals, updater hooks) should move to workflow hooks (`Spree.hooks.register('carts.complete.before_finalize') { |flow| ... }` — handlers receive the workflow instance) or event subscribers.-- **Store-scoped data is single-owner.** `Product`, `Promotion` and `PaymentMethod` `belongs_to :store`; the `stores: [...]` writers are gone. Multi-store sharing lives in the `spree_multi_store` extension.+- **Store-scoped data is single-owner.** `Product`, `Promotion` and `PaymentMethod` `belongs_to :store`; the `stores: [...]` writers are gone, they will work until 6.1 release with a deprecation warning- The Store API v3 contract is stable across the split — cart endpoints keep their shapes; `requirements` gains `code` (and renames the delivery entry's field/code to `delivery_method`, see above), and serializer `number` on carts is bridged as described above.<Warning>