@medusajs/translation
v2.22.1
Published
Medusa Translation module
Keywords
Readme
Translation Module for Medusa: manages locales, translations of entity fields (such as product titles and descriptions), and translation settings that define which entities and fields are translatable. Use it to add multi-language support to a Medusa store. It ships with @medusajs/medusa and is only enabled when the translation feature flag is on.
At a glance
| | |
| --- | --- |
| Package | @medusajs/translation |
| Type | Commerce Module |
| Module key | Modules.TRANSLATION ("translation") |
| Registered by default | Yes, but disabled unless the translation feature flag is enabled |
| Import from | @medusajs/medusa/translation |
Installation
No installation needed. The module ships with @medusajs/medusa. Enable the translation feature flag in medusa-config.ts:
import { defineConfig } from "@medusajs/framework/utils"
module.exports = defineConfig({
// ...
featureFlags: {
translation: true,
},
})Then run the migrations:
npx medusa db:migrateConfiguration
| Environment variable | Description | Default |
| --- | --- | --- |
| MEDUSA_FF_TRANSLATION | Enables the translation feature flag, as an alternative to featureFlags.translation in medusa-config.ts. | false |
