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 |
|---|---|---|---|
Read-only - one-to-many | |||
Read-only - one-to-many | |||
Read-only - one-to-many | |||
Read-only - one-to-many | |||
Read-only - one-to-many | |||
Read-only - one-to-many | |||
Read-only - one-to-many | |||
Read-only - one-to-many | |||
Read-only - has many |
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. |
One-to-many (read-only) | Retrieve translations of a product variant only. | |
One-to-many (read-only) | Retrieve translations of a product category only. | |
One-to-many (read-only) | Retrieve translations of a product collection only. | |
One-to-many (read-only) | Retrieve translations of a product tag only. | |
One-to-many (read-only) | Retrieve translations of a product type only. | |
One-to-many (read-only) | Retrieve translations of a product option only. | |
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:
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: