Links between Translation Module and Other Modules

This document showcases the module links that Medusa defines between the Translation Module and other Commerce Modules.

Summary#

Medusa defines the following links between the Translation Module and other Commerce Modules:

First Data Model

Second Data Model

Type

Description

Product in Product Module

Translation

Read-only - one-to-many

Learn more

ProductVariant in Product Module

Translation

Read-only - one-to-many

Learn more

ProductCategory in Product Module

Translation

Read-only - one-to-many

Learn more

ProductCollection in Product Module

Translation

Read-only - one-to-many

Learn more

ProductTag in Product Module

Translation

Read-only - one-to-many

Learn more

ProductType in Product Module

Translation

Read-only - one-to-many

Learn more

ProductOption in Product Module

Translation

Read-only - one-to-many

Learn more

ProductOptionValue in Product Module

Translation

Read-only - one-to-many

Learn more

StoreLocale in Store Module

Locale

Read-only - has many

Learn more


Product Module#

Medusa defines the following read-only links between the Translation and Product Modules:

Data Model

Link Type

Description

Product <-> Translation

One-to-many (bidirectional)

Retrieve translations associated with a product and vice versa.

ProductVariant -> Translation

One-to-many (read-only)

Retrieve translations of a product variant only.

ProductCategory -> Translation

One-to-many (read-only)

Retrieve translations of a product category only.

ProductCollection -> Translation

One-to-many (read-only)

Retrieve translations of a product collection only.

ProductTag -> Translation

One-to-many (read-only)

Retrieve translations of a product tag only.

ProductType -> Translation

One-to-many (read-only)

Retrieve translations of a product type only.

ProductOption -> Translation

One-to-many (read-only)

Retrieve translations of a product option only.

ProductOptionValue -> Translation

One-to-many (read-only)

Retrieve translations of a product option value only.

Retrieve with Query#

To retrieve the translations of a product with Query, pass translations.* in fields:

Note: You can pass the translations.* field when querying any of the above-mentioned data models to retrieve their associated translations.

Store Module#

The Store Module has a StoreLocale data model that stores the supported locales of a store. However, these locales don't hold all the details of a locale, such as its name.

Instead, Medusa defines a read-only link from the Store Module's StoreLocale data model to the Translation Module's Locale data model. This means you can retrieve the details of a store's supported locales, but you don't manage the links in a pivot table in the database.

Retrieve with Query#

To retrieve the details of a store's locales with Query, pass supported_locales.locale.* in fields:

Was this page helpful?
Ask Bloom
For assistance in your development, use Claude Code Plugins or Docs MCP server in Cursor, VSCode, etc...FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break
⇧↵