docs: translation module (#14271)

* docs: translation module

* fix link in JS SDK

* add translations user guides [WIP]

* updates

* fix broken link

* remove mentions of default locale

* change header

* updates

* updated user guides

* handle todos

* fix build error

* fix lint errors
This commit is contained in:
Shahed Nasser authored and GitHub committed 2025-12-17 13:07:43 +02:00
1 parent 1743ed7f04
commit c1a5390fc6
133 files changed
+21304 -1661

No files matched your search

@@ -56,6 +56,12 @@ const generatedgeneratedStoreSidebarSidebar = {
"path": "workflows", "path": "workflows",
"loaded": true "loaded": true
}, },
{
"type": "link",
"title": "Localization",
"path": "localization",
"loaded": true
},
{ {
"type": "separator" "type": "separator"
}, },
+96 -1
View File
@@ -5,7 +5,7 @@ import {
DividedMarkdownCode DividedMarkdownCode
} from "@/layouts/DividedMarkdown/Sections" } from "@/layouts/DividedMarkdown/Sections"
import Section from "@/components/Section" import Section from "@/components/Section"
import { CodeTabs, CodeTab, H1 } from "docs-ui" import { CodeTabs, CodeTab, H1, Prerequisites } from "docs-ui"
import { Feedback } from "@/components/Feedback" import { Feedback } from "@/components/Feedback"
import ClientLibraries from "./client-libraries.mdx" import ClientLibraries from "./client-libraries.mdx"
@@ -1480,4 +1480,99 @@ Refer to [this guide](!docs!/learn/customization/extend-features/extend-create-p
</SectionContainer> </SectionContainer>
<SectionContainer noTopPadding={true}>
<DividedMarkdownLayout>
<DividedMarkdownContent>
## Localization
<Prerequisites
items={[
{
text: "Translation Module Configured",
link: "!resources!/commerce-modules/translation#configure-translation-module",
}
]}
/>
Medusa's Store APIs support localization. Currently, only product-related information can be localized, such as product titles and descriptions.
By default, the Store APIs return data in the default locale configured in your Medusa application, and falls back to the original data of a resource.
</DividedMarkdownContent>
</DividedMarkdownLayout>
<DividedMarkdownLayout addYSpacing>
<DividedMarkdownContent>
You can set the locale of a request using one of the following methods:
- Use the JS SDK's `setLocale` method. The JS SDK will automatically include the locale in the `x-medusa-locale` header of subsequent requests.
- Pass the `locale` query parameter to the [List Products API route](#products_getproducts).
- Set the `x-medusa-locale` header in the API request to the [List Products API route](#products_getproducts).
Locales are in the [IETF BCP 47](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1) format, such as `en-US` for American English, or `fr-FR` for French.
The returned data will be in the specified locale if a translation exists. Otherwise, it will fall back to the original data.
Learn more in the [Storefront Localization guide](!resources!/storefront-development/localization).
</DividedMarkdownContent>
<DividedMarkdownCode>
<CodeTabs group="request-localization-examples">
<CodeTab label="Using JS SDK" value="js-sdk">
```js
sdk.setLocale("fr-FR")
// products content will be in French
const { products } = await sdk.store.product.list()
```
</CodeTab>
<CodeTab label="Using Query Parameter" value="query-param">
```bash
curl "http://localhost:9000/store/products?locale=fr-FR" \
-H 'x-publishable-api-key: {your_publishable_api_key}'
```
</CodeTab>
<CodeTab label="Using Header" value="header">
```bash
curl "http://localhost:9000/store/products" \
-H 'x-publishable-api-key: {your_publishable_api_key}' \
-H "x-medusa-locale: fr-FR"
```
</CodeTab>
</CodeTabs>
</DividedMarkdownCode>
</DividedMarkdownLayout>
<DividedMarkdownLayout>
<Feedback
extraData={{
section: "localization"
}}
question="Was this section helpful?"
/>
</DividedMarkdownLayout>
</SectionContainer>
</Section> </Section>
@@ -20,7 +20,7 @@ The Medusa Admin dashboard supports [multiple languages](!user-guide!/tips/langu
<Note> <Note>
Medusa Admin translations apply to the interface only. Medusa doesn't support translating store content, such as product names or descriptions. To implement localization for store content, [integrate a CMS](!resources!/integrations#cms). Medusa Admin translations apply to the interface only. To translate content like product data, check out the [Translations user guide](!user-guide!/settings/translations).
</Note> </Note>
+1 -1
View File
@@ -135,7 +135,7 @@ export const generatedEditDates = {
"app/learn/fundamentals/workflows/locks/page.mdx": "2025-12-09T11:20:25.011Z", "app/learn/fundamentals/workflows/locks/page.mdx": "2025-12-09T11:20:25.011Z",
"app/learn/codemods/page.mdx": "2025-09-29T15:40:03.620Z", "app/learn/codemods/page.mdx": "2025-09-29T15:40:03.620Z",
"app/learn/codemods/replace-imports/page.mdx": "2025-10-09T11:37:44.754Z", "app/learn/codemods/replace-imports/page.mdx": "2025-10-09T11:37:44.754Z",
"app/learn/fundamentals/admin/translations/page.mdx": "2025-10-30T11:55:32.221Z", "app/learn/fundamentals/admin/translations/page.mdx": "2025-12-16T13:56:21.400Z",
"app/learn/configurations/medusa-config/asymmetric-encryption/page.mdx": "2025-10-31T09:53:38.607Z", "app/learn/configurations/medusa-config/asymmetric-encryption/page.mdx": "2025-10-31T09:53:38.607Z",
"app/learn/best-practices/third-party-sync/page.mdx": "2025-12-03T11:48:58.209Z" "app/learn/best-practices/third-party-sync/page.mdx": "2025-12-03T11:48:58.209Z"
} }
+735 -25
View File
@@ -8829,7 +8829,7 @@ Translations for admin customizations are available from [Medusa v2.11.1](https:
The Medusa Admin dashboard supports [multiple languages](https://docs.medusajs.com/user-guide/tips/languages/index.html.md) for its interface. Medusa uses [react-i18next](https://react.i18next.com/) to manage translations in the admin dashboard. The Medusa Admin dashboard supports [multiple languages](https://docs.medusajs.com/user-guide/tips/languages/index.html.md) for its interface. Medusa uses [react-i18next](https://react.i18next.com/) to manage translations in the admin dashboard.
Medusa Admin translations apply to the interface only. Medusa doesn't support translating store content, such as product names or descriptions. To implement localization for store content, [integrate a CMS](https://docs.medusajs.com/resources/integrations#cms/index.html.md). Medusa Admin translations apply to the interface only. To translate content like product data, check out the [Translations user guide](https://docs.medusajs.com/user-guide/settings/translations/index.html.md).
When you create [Widgets](https://docs.medusajs.com/learn/fundamentals/admin/widgets/index.html.md) or [UI Routes](https://docs.medusajs.com/learn/fundamentals/admin/ui-routes/index.html.md) to customize the Medusa Admin, you can provide translations for the text content in your customizations, allowing users to view your customizations in their preferred language. When you create [Widgets](https://docs.medusajs.com/learn/fundamentals/admin/widgets/index.html.md) or [UI Routes](https://docs.medusajs.com/learn/fundamentals/admin/ui-routes/index.html.md) to customize the Medusa Admin, you can provide translations for the text content in your customizations, allowing users to view your customizations in their preferred language.
@@ -30827,6 +30827,16 @@ A cart holds information about:
- The payment method and information necessary to complete the purchase. - The payment method and information necessary to complete the purchase.
- These are stored and handled by the [Payment Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/payment/index.html.md). - These are stored and handled by the [Payment Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/payment/index.html.md).
### Cart Locale
Cart locale is available starting [Medusa v2.12.3](https://github.com/medusajs/medusa/releases/tag/v2.12.3).
The `Cart` data model has a `locale` property that indicates the locale of the cart. This locale is in the [IETF BCP 47 standard](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1) format, such as `en-US` for American English or `fr-FR` for French (France).
When creating a cart, you can set the `locale` property to specify the desired locale for the cart. The information of the items in the cart, such as product titles and descriptions, will be displayed in the specified locale if translations are available.
Refer to the [Translation Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/translation/index.html.md) to learn more about how translations and locales work.
*** ***
## Line Items ## Line Items
@@ -33985,6 +33995,18 @@ An order holds information about:
- This is stored and handled by the [Customer Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/customer/index.html.md). - This is stored and handled by the [Customer Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/customer/index.html.md).
- Payment and shipping information - Payment and shipping information
## Order Locale
Order locale is available starting [Medusa v2.12.3](https://github.com/medusajs/medusa/releases/tag/v2.12.3).
The `Order` data model has a `locale` property that indicates the locale of the order. This locale is in the [IETF BCP 47 standard](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1) format, such as `en-US` for American English or `fr-FR` for French (France).
When an order is created from a cart or a draft order, the order inherits their locale. This ensures that all item details in the order, such as product titles and descriptions, are presented in the correct language if translations are available.
When order items are changed through an edit, claim, or exchange, the new items added to the order will also have their details in the order's locale if translations are available.
You can also edit an order's locale using the [Update Order](https://docs.medusajs.com/api/admin#orders_postordersid) API route.
*** ***
## Order Items ## Order Items
@@ -34218,6 +34240,12 @@ Similar to regular orders, draft orders can be [edited](https://docs.medusajs.co
When the order edit is confirmed on the draft order, the changes are applied directly to the draft order and its [version](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/order-versioning/index.html.md) is incremented. When the order edit is confirmed on the draft order, the changes are applied directly to the draft order and its [version](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/order/order-versioning/index.html.md) is incremented.
### Draft Order Locale
A draft order's `locale` can be set and updated before converting it to a regular order. All item details in the draft order, such as product titles and descriptions, will be presented in the correct language if translations are available.
When the draft order is converted to a regular order, it retains its `locale` property. The details of the order items will remain in the specified locale.
### Converting Draft Orders to Regular Orders ### Converting Draft Orders to Regular Orders
Once a draft order is finalized and ready for processing, it can be converted to a regular order. This involves: Once a draft order is finalized and ready for processing, it can be converted to a regular order. This involves:
@@ -35747,7 +35775,9 @@ A Commerce Module also defines data models, representing tables in the database.
- [Stock Location Module](https://docs.medusajs.com/commerce-modules/stock-location/index.html.md) - [Stock Location Module](https://docs.medusajs.com/commerce-modules/stock-location/index.html.md)
- [Store Module](https://docs.medusajs.com/commerce-modules/store/index.html.md) - [Store Module](https://docs.medusajs.com/commerce-modules/store/index.html.md)
- [Tax Module](https://docs.medusajs.com/commerce-modules/tax/index.html.md) - [Tax Module](https://docs.medusajs.com/commerce-modules/tax/index.html.md)
- [User Module](https://docs.medusajs.com/commerce-modules/user/index.html.md) - [Translation Module](https://docs.medusajs.com/commerce-modules/translation/index.html.md)
[User Module](https://docs.medusajs.com/commerce-modules/user/index.html.md): undefined
*** ***
@@ -39053,6 +39083,14 @@ Read-only links are used to query data across modules, but the relations aren't
|OrderLineItem|Product|Read-only - has one|Learn more| |OrderLineItem|Product|Read-only - has one|Learn more|
|ProductVariant|PriceSet|Stored - one-to-one|Learn more| |ProductVariant|PriceSet|Stored - one-to-one|Learn more|
|Product|SalesChannel|Stored - many-to-many|Learn more| |Product|SalesChannel|Stored - many-to-many|Learn more|
|Product|Translation|Read-only - one-to-many|Learn more|
|ProductVariant|Translation|Read-only - one-to-many|Learn more|
|ProductCategory|Translation|Read-only - one-to-many|Learn more|
|ProductCollection|Translation|Read-only - one-to-many|Learn more|
|ProductTag|Translation|Read-only - one-to-many|Learn more|
|ProductType|Translation|Read-only - one-to-many|Learn more|
|ProductOption|Translation|Read-only - one-to-many|Learn more|
|ProductOptionValue|Translation|Read-only - one-to-many|Learn more|
*** ***
@@ -39480,6 +39518,61 @@ createRemoteLinkStep({
}) })
``` ```
***
## Translation Module
### Prerequisites
Medusa defines read-only links from several data models in the Product Module to the [Translation](https://docs.medusajs.com/references/translation/models/Translation/index.html.md) data model in the [Translation Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/translation/index.html.md):
- `Product` (one-to-many) to `Translation`, and vice versa.
- `ProductVariant` (one-to-many) to `Translation`. You can only retrieve the translations of a product variant, and not the other way around.
- `ProductCategory` (one-to-many) to `Translation`. You can only retrieve the translations of a product category, and not the other way around.
- `ProductCollection` (one-to-many) to `Translation`. You can only retrieve the translations of a product collection, and not the other way around.
- `ProductTag` (one-to-many) to `Translation`. You can only retrieve the translations of a product tag, and not the other way around.
- `ProductType` (one-to-many) to `Translation`. You can only retrieve the translations of a product type, and not the other way around.
- `ProductOption` (one-to-many) to `Translation`. You can only retrieve the translations of a product option, and not the other way around.
- `ProductOptionValue` (one-to-many) to `Translation`. You can only retrieve the translations of a product option value, and not the other way around.
### Retrieve with Query
To retrieve the translations of a product with [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `translations.*` in `fields`:
You can pass the `translations.*` field when querying any of the above-mentioned data models to retrieve their associated translations.
### query.graph
```ts
const { data: products } = await query.graph({
entity: "product",
fields: [
"translations.*",
],
})
// products[0].translations
```
### useQueryGraphStep
```ts
import { useQueryGraphStep } from "@medusajs/medusa/core-flows"
// ...
const { data: products } = useQueryGraphStep({
entity: "product",
fields: [
"translations.*",
],
})
// products[0].translations
```
# Product Module # Product Module
@@ -42083,14 +42176,15 @@ Read-only links are used to query data across modules, but the relations aren't
|First Data Model|Second Data Model|Type|Description| |First Data Model|Second Data Model|Type|Description|
|---|---|---|---| |---|---|---|---|
|StoreCurrency|Currency|Read-only - has many|Learn more| |StoreCurrency|Currency|Read-only - has many|Learn more|
|StoreLocale|Locale|Read-only - has many|Learn more|
*** ***
## Currency Module ## Currency Module
The Store Module has a `Currency` data model that stores the supported currencies of a store. However, these currencies don't hold all the details of a currency, such as its name or symbol. The Store Module has a `StoreCurrency` data model that stores the supported currencies of a store. However, these currencies don't hold all the details of a currency, such as its name or symbol.
Instead, Medusa defines a read-only link between the [Currency Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/currency/index.html.md)'s `Currency` data model and the Store Module's `StoreCurrency` data model. This means you can retrieve the details of a store's supported currencies, but you don't manage the links in a pivot table in the database. The currencies of a store are determined by the `currency_code` of the [Currency](https://docs.medusajs.com/references/store/models/StoreCurrency/index.html.md) data model in the Store Module (not in the Currency Module). Instead, Medusa defines a read-only link from the Store Module's `StoreCurrency` data model to the [Currency Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/currency/index.html.md)'s `Currency` data model. This means you can retrieve the details of a store's supported currencies, but you don't manage the links in a pivot table in the database.
### Retrieve with Query ### Retrieve with Query
@@ -42126,6 +42220,73 @@ const { data: stores } = useQueryGraphStep({
// stores[0].supported_currencies // stores[0].supported_currencies
``` ```
***
## Translation Module
### Prerequisites
- [Translation Module Configured](https://docs.medusajs.com/commerce-modules/translation#configure-translation-module/index.html.md)
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](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/translation/index.html.md)'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](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `supported_locales.locale.*` in `fields`:
### query.graph
```ts
const { data: stores } = await query.graph({
entity: "store",
fields: [
"supported_locales.locale.*",
],
})
// stores[0].supported_locales[0].locale
```
### useQueryGraphStep
```ts
import { useQueryGraphStep } from "@medusajs/medusa/core-flows"
// ...
const { data: stores } = useQueryGraphStep({
entity: "store",
fields: [
"supported_locales.locale.*",
],
})
// stores[0].supported_locales[0].locale
```
# Store Locales
In this guide, you'll learn about locales defined in the Store Module.
### Prerequisites
- [Medusa v2.12.3 or later](https://github.com/medusajs/medusa/releases/tag/v2.12.3)
While the Store Module allows you to manage the locales for your store, the actual locale data and translations are managed by the [Translation Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/translation/index.html.md).
## Supported Locales
The Store Module has a [StoreLocale](https://docs.medusajs.com/references/store/models/StoreLocale/index.html.md) data model that represents the locales supported by your store. It has a `locale_code` property that follows the [IETF BCP 47 standard](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1). For example, `en-US` represents American English, while `fr-FR` represents French (France).
`StoreLocale` belongs to the [Store](https://docs.medusajs.com/references/store/models/Store/index.html.md) data model, which has a `supported_locales` property that lists all the locales available in your store.
For example, if your store supports English (United States) and French (France), you'll have two `StoreLocale` records with the locale codes `en-US` and `fr-FR`.
![Diagram illustrating the relationship between the Store and StoreLocale data models](https://res.cloudinary.com/dza7lstvk/image/upload/v1765371144/Medusa%20Resources/store-locale_ckanv4.jpg)
# Store Module # Store Module
@@ -42676,6 +42837,518 @@ You can use Medusa's default tax provider or create a custom one, allowing you t
Learn more about tax providers in the [Tax Provider](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/tax/tax-provider/index.html.md) guide. Learn more about tax providers in the [Tax Provider](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/tax/tax-provider/index.html.md) guide.
# Translation Concepts
In this guide, you'll learn about the key concepts related to the Translation Module, including locales and translations.
### Prerequisites
- [Translation Module Configured](https://docs.medusajs.com/commerce-modules/translation#configure-translation-module/index.html.md)
## Locales
The [Locale data model](https://docs.medusajs.com/references/translation/models/Locale/index.html.md) represents a language that resources can be translated into.
Its `code` property follows the [IETF BCP 47 standard](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1). For example, `en-US` represents American English, while `fr-FR` represents French (France).
Locales are automatically populated in your Medusa application the first time the Translation Module is used.
### Default Locale
The Translation Module doesn't enforce a default locale. If a resource doesn't have a translation in the requested locale, it will fall back to the original value stored in the resource's data model.
***
## Translations
The [Translation data model](https://docs.medusajs.com/references/translation/models/Translation/index.html.md) represents a translated value for a specific resource in a specific locale.
The data model has the following properties to associate the translation with the resource:
- `reference_id`: The ID of the resource being translated (for example, the ID of the product being translated).
- `reference`: The name of the table where the resource is stored (for example, `product` when translating a product).
The locale of the translation is indicated by the `locale_code` property, which follows the same [IETF BCP 47 standard](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1) as the [Locale](#locales) data model.
A resource may have only one translation per locale. For example, a product can have only one translation in `fr-FR` and another translation in `es-ES`.
The actual translated values are stored in the `translations` property, which is a JSON object where each key represents a field of the resource being translated, and the value is the translated text.
For example, a translation for a product to French (`fr-FR`) may look like this:
```json
{
"reference_id": "prod_123",
"reference": "product",
"locale_code": "fr-FR",
"translations": {
"title": "Produit Exemple",
"description": "Ceci est une description en français."
}
}
```
Each key in the `translations` object corresponds to a property in the product resource, such as `title` and `description`, with their respective translated values.
***
## Retrieve Translations in Medusa
To retrieve translations for the storefront, refer to the [Serve Translations in the Storefront](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/translation/storefront/index.html.md) guide.
You can retrieve translations for a resource on the Medusa server using [Query](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md). You can filter translations by `reference_id` and `locale_code` to get the specific translation you need.
For example:
```ts
const { data: translations } = await query.graph({
entity: "translation",
fields: ["reference_id", "locale_code", "translations"],
filters: {
reference_id: "prod_123",
locale_code: "fr-FR",
},
})
console.log(translations)
// Output:
// [{
// reference_id: "prod_123",
// locale_code: "fr-FR",
// translations: {
// title: "Produit Exemple",
// description: "Ceci est une description en français."
// }
// }]
```
In this example, you retrieve the translation records of a product with the ID `prod_123` in French (`fr-FR`).
If you've enabled the [Caching Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/infrastructure-modules/caching/index.html.md) in your Medusa application, you can also cache translation queries to improve performance:
```ts
const { data: translations } = await query.graph({
entity: "translation",
fields: ["reference_id", "locale_code", "translations"],
filters: {
reference_id: "prod_123",
locale_code: "fr-FR",
},
}, {
cache: {
enable: true,
},
})
console.log(translations)
// Output:
// [{
// reference_id: "prod_123",
// locale_code: "fr-FR",
// translations: {
// title: "Produit Exemple",
// description: "Ceci est une description en français."
// }
// }]
```
# 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|Translation|Read-only - one-to-many|Learn more|
|ProductVariant|Translation|Read-only - one-to-many|Learn more|
|ProductCategory|Translation|Read-only - one-to-many|Learn more|
|ProductCollection|Translation|Read-only - one-to-many|Learn more|
|ProductTag|Translation|Read-only - one-to-many|Learn more|
|ProductType|Translation|Read-only - one-to-many|Learn more|
|ProductOption|Translation|Read-only - one-to-many|Learn more|
|ProductOptionValue|Translation|Read-only - one-to-many|Learn more|
|StoreLocale|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|One-to-many (bidirectional)|Retrieve translations associated with a product and vice versa.|
|ProductVariant|One-to-many (read-only)|Retrieve translations of a product variant only.|
|ProductCategory|One-to-many (read-only)|Retrieve translations of a product category only.|
|ProductCollection|One-to-many (read-only)|Retrieve translations of a product collection only.|
|ProductTag|One-to-many (read-only)|Retrieve translations of a product tag only.|
|ProductType|One-to-many (read-only)|Retrieve translations of a product type only.|
|ProductOption|One-to-many (read-only)|Retrieve translations of a product option only.|
|ProductOptionValue|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](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `translations.*` in `fields`:
You can pass the `translations.*` field when querying any of the above-mentioned data models to retrieve their associated translations.
### query.graph
```ts
const { data: products } = await query.graph({
entity: "product",
fields: [
"translations.*",
],
})
// products[0].translations
```
### useQueryGraphStep
```ts
import { useQueryGraphStep } from "@medusajs/medusa/core-flows"
// ...
const { data: products } = useQueryGraphStep({
entity: "product",
fields: [
"translations.*",
],
})
// products[0].translations
```
***
## Store Module
The [Store Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/store/index.html.md) 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](https://docs.medusajs.com/docs/learn/fundamentals/module-links/query/index.html.md), pass `supported_locales.locale.*` in `fields`:
### query.graph
```ts
const { data: stores } = await query.graph({
entity: "store",
fields: [
"supported_locales.locale.*",
],
})
// stores[0].supported_locales[0].locale
```
### useQueryGraphStep
```ts
import { useQueryGraphStep } from "@medusajs/medusa/core-flows"
// ...
const { data: stores } = useQueryGraphStep({
entity: "store",
fields: [
"supported_locales.locale.*",
],
})
// stores[0].supported_locales[0].locale
```
# Translation Module
In this section of the documentation, you will find resources to learn more about the Translation Module and how to use it in your application.
### Prerequisites
- [Medusa v2.12.3 or later](https://github.com/medusajs/medusa/releases/tag/v2.12.3)
- [Translation Feature Flag Enabled](#)
Refer to the [Medusa Admin User Guide](https://docs.medusajs.com/user-guide/settings/translations/index.html.md) to learn how to manage translations in the dashboard.
Medusa has translation features available out-of-the-box through the Translation Module. A [module](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md) is a standalone package that provides features for a single domain. Each of Medusa's commerce features is provided in Commerce Modules, such as the Translation Module.
Refer to the [Module Isolation](https://docs.medusajs.com/docs/learn/fundamentals/modules/isolation/index.html.md) guide to learn more about why modules are isolated.
## Translation Features
- [Translation and Locale Management](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/translation/concepts/index.html.md): Manage locales and add translations for different resources in your store.
- [Multi-Language Support](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/translation/storefront/index.html.md): Manage and serve resources like products in multiple languages to cater to a diverse customer base.
***
## Configure Translation Module
The Translation Module is currently behind a feature flag. To use it in your Medusa application, add it to the `modules` array and enable the `translation` feature flag.
In your `medusa-config.ts` file, add the Translation Module to the `modules` array and enable the `translation` feature flag:
```ts title="medusa-config.ts"
module.exports = defineConfig({
// ...
modules: [
// other modules...
{
resolve: "@medusajs/medusa/translation",
},
],
featureFlags: {
translation: true,
},
})
```
Then, run the following command to make the necessary database changes for the Translation Module:
```bash
npx medusa db:migrate
```
You can then use the Translation Module in your Medusa application.
***
## How to Use the Translation Module
In your Medusa application, you build flows around Commerce Modules. A flow is built as a [Workflow](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md), which is a special function composed of a series of steps that guarantees data consistency and a reliable rollback mechanism.
You can build custom workflows and steps. You can also re-use Medusa's workflows and steps, which are provided by the `@medusajs/medusa/core-flows` package.
For example:
```ts title="src/workflows/create-translation.ts" highlights={highlights}
import {
createWorkflow,
WorkflowResponse,
createStep,
StepResponse,
} from "@medusajs/framework/workflows-sdk"
import { Modules } from "@medusajs/framework/utils"
const createTranslationStep = createStep(
"create-translation",
async ({}, { container }) => {
const translationModuleService = container.resolve(Modules.TRANSLATION)
const translation = await translationModuleService.createTranslations({
reference_id: "product_123",
reference: "product",
locale_code: "fr-FR",
translations: {
title: "Produit Exemple",
description: "Ceci est une description en français.",
},
})
return new StepResponse({ translation }, translation.id)
},
async (translationId, { container }) => {
const translationModuleService = container.resolve(Modules.TRANSLATION)
await translationModuleService.deleteTranslations([translationId])
},
)
export const createTranslationWorkflow = createWorkflow(
"create-translation",
() => {
const { translation } = createTranslationStep()
return new WorkflowResponse({
translation,
})
},
)
```
You can then execute the workflow in your custom API routes, scheduled jobs, or subscribers:
### API Route
```ts title="src/api/workflow/route.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports"
import type {
MedusaRequest,
MedusaResponse,
} from "@medusajs/framework/http"
import { createTranslationWorkflow } from "../../workflows/create-translation"
export async function GET(
req: MedusaRequest,
res: MedusaResponse
) {
const { result } = await createTranslationWorkflow(req.scope)
.run()
res.send(result)
}
```
### Subscriber
```ts title="src/subscribers/user-created.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports"
import {
type SubscriberConfig,
type SubscriberArgs,
} from "@medusajs/framework"
import { createTranslationWorkflow } from "../workflows/create-translation"
export default async function handleUserCreated({
event: { data },
container,
}: SubscriberArgs<{ id: string }>) {
const { result } = await createTranslationWorkflow(container)
.run()
console.log(result)
}
export const config: SubscriberConfig = {
event: "user.created",
}
```
### Scheduled Job
```ts title="src/jobs/run-daily.ts" highlights={[["7"], ["8"]]}
import { MedusaContainer } from "@medusajs/framework/types"
import { createTranslationWorkflow } from "../workflows/create-translation"
export default async function myCustomJob(
container: MedusaContainer
) {
const { result } = await createTranslationWorkflow(container)
.run()
console.log(result)
}
export const config = {
name: "run-once-a-day",
schedule: `0 0 * * *`,
}
```
Refer to the [Workflows](https://docs.medusajs.com/docs/learn/fundamentals/workflows/index.html.md) documentation to learn more.
***
## Supported Module Translations
The Translation Module currently supports translations for all data models in the [Product Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/product/index.html.md), including products, product variants, and categories.
Future versions of the Translation Module will include support for all Commerce Modules, as well as custom modules.
***
# Serve Translations in the Storefront
In this guide, you’ll learn how to use locales and serve translated content in your storefront application in your Medusa application.
### Prerequisites
- [Translation Module Configured](https://docs.medusajs.com/commerce-modules/translation#configure-translation-module/index.html.md)
## Fetch Store Locales
You can retrieve the list of locales available in your store using the [List Locales Store API route](https://docs.medusajs.com/api/store#locales_getlocales). You can display this list to customers, allowing them to select their preferred language.
For example, to fetch the list of locales, send a `GET` request to the following endpoint:
```bash
curl "http://localhost:9000/store/locales" \
-H 'x-publishable-api-key: {your_publishable_api_key}'
```
Learn more in the [Localization](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/localization/index.html.md) storefront guide.
You must pass a publishable API key in the request header to store API routes. Learn more in the [Store API reference](https://docs.medusajs.com/api/store#publishable-api-key).
***
## Retrieve Translations for Resources
Currently, you can retrieve translations using the [Store API routes](https://docs.medusajs.com/api/store) for product-related resources, such as products, product variants, and categories. Future releases will expand translation support to additional resources.
Medusa determines the locale for the request in the following order of priority:
- The `locale` query parameter in the API request.
- The `x-medusa-locale` header in the API request.
If translations aren't available for the selected locale, or no locale is selected, the original content stored in the resource's data model is returned.
For example:
```bash
curl "http://localhost:9000/store/products?locale=fr-FR" \
-H 'x-publishable-api-key: {your_publishable_api_key}'
```
This returns the list of products with their French (France) translations if available:
```json
{
"products": [
{
"id": "prod_123",
"title": "Produit Exemple",
"description": "Ceci est une description en français.",
// other product fields...
},
// other products...
]
}
```
Learn more in the [List Products](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/products/list#retrieve-translations-for-products/index.html.md) storefront guide.
***
## Set a Cart's Locale
A cart can have a locale, which determines the language of the item contents. You can set the locale when creating the cart and update it if the user changes their language preference.
For example, when creating a cart, set the `locale` property in the request body:
```bash
curl -X POST "http://localhost:9000/store/carts" \
-H 'x-publishable-api-key: {your_publishable_api_key}' \
-H "Content-Type: application/json" \
-d '{
// other cart properties...
"locale": "fr-FR"
}'
```
This creates a cart with the French (France) locale. When you add items to the cart, their titles and descriptions are displayed in French if translations are available.
If you don't specify a locale when creating the cart, the original product content is used for the items in the cart.
Learn more in the [Create Cart](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/cart/create/index.html.md) and [Update Cart](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/cart/update/index.html.md) storefront guides.
***
## Locale of Placed Order
When a cart is completed and an order is placed, the locale of the cart is copied to the order. The content of items in the order is displayed in the locale that was set in the cart.
This ensures that customers see order details in their preferred language.
# Send Invite User Email Notification # Send Invite User Email Notification
In this guide, you'll learn how to handle the `invite.created` and `invite.resent` events to send an invite email (or other notification type) to the user. In this guide, you'll learn how to handle the `invite.created` and `invite.resent` events to send an invite email (or other notification type) to the user.
@@ -48178,23 +48851,23 @@ WE_REDIS_URL=<YOUR_REDIS_URL>
### Redis Workflow Engine Module Options ### Redis Workflow Engine Module Options
|Option|Description|Required|Default| |Option|Description|Required|
|---|---|---|---|---|---|---| |---|---|---|---|---|
|\`url\`|A string indicating the Redis connection URL.|No. If not provided, you must provide the |-| |\`url\`|A string indicating the Redis connection URL.|No. If not provided, you must provide the |
|\`redisUrl\`|A string indicating the Redis connection URL.|No. If not provided, you must provide the |-| |\`redisUrl\`|A string indicating the Redis connection URL.|No. If not provided, you must provide the |
|\`pubsub\`|A connection object having the following properties:|No. If not provided, you must provide the |-| |\`pubsub\`|A connection object having the following properties:|No. If not provided, you must provide the |
|\`queueName\`|The name of the queue used to keep track of retries and timeouts for workflow executions.|No|\`medusa-workflows\`| |\`queueName\`|The name of the queue used to keep track of retries and timeouts for workflow executions.|No|
|\`jobQueueName\`|The name of the queue used to keep track of retries and timeouts for scheduled jobs.|No|\`medusa-workflows-jobs\`| |\`jobQueueName\`|The name of the queue used to keep track of retries and timeouts for scheduled jobs.|No|
|\`options\`|An object of Redis options. Refer to the |No|-| |\`options\`|An object of Redis options. Refer to the |No|
|\`redisOptions\`|An object of Redis options. Refer to the |No|-| |\`redisOptions\`|An object of Redis options. Refer to the |No|
|\`queueOptions\`|An object of options to pass to all BullMQ instances. Refer to |No|-| |\`queueOptions\`|An object of options to pass to all BullMQ instances. Refer to |No|
|\`workerOptions\`|An object of options to pass to all BullMQ worker instances. Refer to |No|-| |\`workerOptions\`|An object of options to pass to all BullMQ worker instances. Refer to |No|
|\`mainQueueOptions\`|An object of options to pass to the main BullMQ queue instance for workflows. Refer to |No|-| |\`mainQueueOptions\`|An object of options to pass to the main BullMQ queue instance for workflows. Refer to |No|
|\`mainWorkerOptions\`|An object of options to pass to the main BullMQ worker instance for workflows. Refer to |No|-| |\`mainWorkerOptions\`|An object of options to pass to the main BullMQ worker instance for workflows. Refer to |No|
|\`jobQueueOptions\`|An object of options to pass to the main BullMQ workflow queue instance for scheduled jobs. Refer to |No|-| |\`jobQueueOptions\`|An object of options to pass to the main BullMQ workflow queue instance for scheduled jobs. Refer to |No|
|\`jobWorkerOptions\`|An object of options to pass to the main BullMQ workflow worker instance for scheduled jobs. Refer to |No|-| |\`jobWorkerOptions\`|An object of options to pass to the main BullMQ workflow worker instance for scheduled jobs. Refer to |No|
|\`cleanerQueueOptions\`|An object of options to pass to the BullMQ cleaner queue instance. Refer to |No|-| |\`cleanerQueueOptions\`|An object of options to pass to the BullMQ cleaner queue instance. Refer to |No|
|\`cleanerWorkerOptions\`|An object of options to pass to the BullMQ cleaner worker instance. Refer to |No|-| |\`cleanerWorkerOptions\`|An object of options to pass to the BullMQ cleaner worker instance. Refer to |No|
## Test the Module ## Test the Module
@@ -51885,6 +52558,39 @@ The JS SDK appends request-specific headers to authentication headers and header
*** ***
## Localization with JS SDK
### Prerequisites
- [Translation Module Configured](https://docs.medusajs.com/commerce-modules/translation#configure-translation-module/index.html.md)
If you support [localization](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/storefront-development/localization/index.html.md) in your storefront, you can use the `setLocale` method of the JS SDK.
The `setLocale` method stores the locale in the JS SDK to pass the it as a `x-medusa-locale` header in all subsequent requests. Also, if your application supports `localStorage`, the method sets the locale in the `medusa_locale` key of the `localStorage`.
For example, to set the locale to French (France):
```ts
sdk.setLocale("fr-FR")
// products content is fetched in French
const { products } = await sdk.store.product.list()
```
The `setLocale` method accepts the locale string in the [IETF BCP 47 standard](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1). All subsequent requests sent using the JS SDK will include the specified locale in the `x-medusa-locale` header.
In the above example, the product content, such as title and description, is fetched in French and falls back to the original content if translations aren't available.
You can also retrieve the currently set locale using the `getLocale` method:
```ts
const currentLocale = sdk.getLocale()
console.log(currentLocale) // "fr-FR"
```
Learn more about localization and translations in the [Translation Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/translation/index.html.md) guide.
***
## Medusa JS SDK Tips ## Medusa JS SDK Tips
### Use Tanstack (React) Query in Admin Customizations ### Use Tanstack (React) Query in Admin Customizations
@@ -98699,6 +99405,8 @@ If you encounter issues not covered in the troubleshooting guides:
In this tutorial, you'll learn how to localize your Medusa store's data with Contentful. In this tutorial, you'll learn how to localize your Medusa store's data with Contentful.
[Translation Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/translation/index.html.md) is available since [Medusa v2.12.3](https://github.com/medusajs/medusa/releases/tag/v2.12.3). It allows you to manage translations for product-related resources through Medusa's Store API routes. For general localization needs, consider using the Translation Module instead of integrating a third-party CMS.
When you install a Medusa application, you get a fully-fledged commerce platform with a Framework for customization. While Medusa provides features essential for internationalization, such as support for multiple [regions](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/region/index.html.md) and [currencies](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/currency/index.html.md), it doesn't provide content localization. When you install a Medusa application, you get a fully-fledged commerce platform with a Framework for customization. While Medusa provides features essential for internationalization, such as support for multiple [regions](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/region/index.html.md) and [currencies](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/currency/index.html.md), it doesn't provide content localization.
However, Medusa's architecture supports the integration of third-party services to provide additional features, such as data localization. One service you can integrate is [Contentful](https://www.contentful.com/), a headless content management system (CMS) that allows you to manage and deliver content across multiple channels. However, Medusa's architecture supports the integration of third-party services to provide additional features, such as data localization. One service you can integrate is [Contentful](https://www.contentful.com/), a headless content management system (CMS) that allows you to manage and deliver content across multiple channels.
@@ -150424,12 +151132,14 @@ A multi-regional setup lets merchants manage their inventory through Medusa acro
## Multi-Lingual Setup ## Multi-Lingual Setup
By integrating a third-party Content Management Systems (CMS), you benefit from rich content features including managing your content in multiple languages. This allows you to cater to customers’ different languages in the regions you serve. Medusa's [Translation Module](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/translation/index.html.md) allows merchants to manage translations for product-related resources through Medusa's Store API routes.
To integrate a third-party system, create a custom module whose main service connects to that third-party service. You can also follow the [Contentful integration guide](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/integrations/guides/contentful/index.html.md) to learn how to integrate Contentful and benefit from localization features. This enables merchants to provide a localized experience for customers in different regions by serving translated content in their storefront applications.
- [Create a Module](https://docs.medusajs.com/docs/learn/fundamentals/modules/index.html.md): Learn how to create a module in Medusa. Future versions of the Translation Module will expand translation support to additional resources beyond product-related ones.
- [Integrate Contentful](https://docs.medusajs.com/integrations/guides/contentful/index.html.md): Integrate Contentful with Localization Features.
- [Manage Translations](https://docs.medusajs.com/user-guide/settings/translations/index.html.md): Learn how to manage translations in the Medusa Admin.
- [Localizing Storefronts](https://docs.medusajs.com/storefront-development/localization/index.html.md): Learn how to localize your storefront applications.
# Omnichannel Commerce Recipe # Omnichannel Commerce Recipe
@@ -18,6 +18,20 @@ A cart holds information about:
- The payment method and information necessary to complete the purchase. - The payment method and information necessary to complete the purchase.
- These are stored and handled by the [Payment Module](../../payment/page.mdx). - These are stored and handled by the [Payment Module](../../payment/page.mdx).
### Cart Locale
<Note>
Cart locale is available starting [Medusa v2.12.3](https://github.com/medusajs/medusa/releases/tag/v2.12.3).
</Note>
The `Cart` data model has a `locale` property that indicates the locale of the cart. This locale is in the [IETF BCP 47 standard](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1) format, such as `en-US` for American English or `fr-FR` for French (France).
When creating a cart, you can set the `locale` property to specify the desired locale for the cart. The information of the items in the cart, such as product titles and descriptions, will be displayed in the specified locale if translations are available.
Refer to the [Translation Module](../../translation/page.mdx) to learn more about how translations and locales work.
--- ---
## Line Items ## Line Items
@@ -17,6 +17,22 @@ An order holds information about:
- This is stored and handled by the [Customer Module](../../customer/page.mdx). - This is stored and handled by the [Customer Module](../../customer/page.mdx).
- Payment and shipping information - Payment and shipping information
## Order Locale
<Note>
Order locale is available starting [Medusa v2.12.3](https://github.com/medusajs/medusa/releases/tag/v2.12.3).
</Note>
The `Order` data model has a `locale` property that indicates the locale of the order. This locale is in the [IETF BCP 47 standard](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1) format, such as `en-US` for American English or `fr-FR` for French (France).
When an order is created from a cart or a draft order, the order inherits their locale. This ensures that all item details in the order, such as product titles and descriptions, are presented in the correct language if translations are available.
When order items are changed through an edit, claim, or exchange, the new items added to the order will also have their details in the order's locale if translations are available.
You can also edit an order's locale using the [Update Order](!api!/admin#orders_postordersid) API route.
--- ---
## Order Items ## Order Items
@@ -102,6 +102,12 @@ Similar to regular orders, draft orders can be [edited](../edit/page.mdx), allow
When the order edit is confirmed on the draft order, the changes are applied directly to the draft order and its [version](../order-versioning/page.mdx) is incremented. When the order edit is confirmed on the draft order, the changes are applied directly to the draft order and its [version](../order-versioning/page.mdx) is incremented.
### Draft Order Locale
A draft order's `locale` can be set and updated before converting it to a regular order. All item details in the draft order, such as product titles and descriptions, will be presented in the correct language if translations are available.
When the draft order is converted to a regular order, it retains its `locale` property. The details of the order items will remain in the specified locale.
### Converting Draft Orders to Regular Orders ### Converting Draft Orders to Regular Orders
Once a draft order is finalized and ready for processing, it can be converted to a regular order. This involves: Once a draft order is finalized and ready for processing, it can be converted to a regular order. This involves:
@@ -1,4 +1,4 @@
import { CardList } from "docs-ui" import { CardList, Card } from "docs-ui"
export const metadata = { export const metadata = {
title: `Commerce Modules`, title: `Commerce Modules`,
@@ -85,12 +85,22 @@ A Commerce Module also defines data models, representing tables in the database.
href: "/commerce-modules/tax" href: "/commerce-modules/tax"
}, },
{ {
title: "User Module", title: "Translation Module",
href: "/commerce-modules/user" href: "/commerce-modules/translation",
} badge: {
children: "Beta",
variant: "blue"
}
},
]} ]}
/> />
<Card
title="User Module"
href="/commerce-modules/user"
className="my-1"
/>
--- ---
## How to Use Modules ## How to Use Modules
@@ -8,7 +8,7 @@ products:
- sales channel - sales channel
--- ---
import { CodeTabs, CodeTab, Table } from "docs-ui" import { CodeTabs, CodeTab, Table, Prerequisites } from "docs-ui"
export const metadata = { export const metadata = {
title: `Links between Product Module and Other Modules`, title: `Links between Product Module and Other Modules`,
@@ -130,6 +130,118 @@ Read-only links are used to query data across modules, but the relations aren't
[Learn more](#sales-channel-module) [Learn more](#sales-channel-module)
</Table.Cell> </Table.Cell>
</Table.Row> </Table.Row>
<Table.Row>
<Table.Cell>
[Product](/references/product/models/Product)
</Table.Cell>
<Table.Cell>
[Translation](/references/translation/models/Translation) in [Translation Module](../../translation/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#translation-module)
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductVariant](/references/product/models/ProductVariant)
</Table.Cell>
<Table.Cell>
[Translation](/references/translation/models/Translation) in [Translation Module](../../translation/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#translation-module)
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductCategory](/references/product/models/ProductCategory)
</Table.Cell>
<Table.Cell>
[Translation](/references/translation/models/Translation) in [Translation Module](../../translation/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#translation-module)
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductCollection](/references/product/models/ProductCollection)
</Table.Cell>
<Table.Cell>
[Translation](/references/translation/models/Translation) in [Translation Module](../../translation/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#translation-module)
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductTag](/references/product/models/ProductTag)
</Table.Cell>
<Table.Cell>
[Translation](/references/translation/models/Translation) in [Translation Module](../../translation/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#translation-module)
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductType](/references/product/models/ProductType)
</Table.Cell>
<Table.Cell>
[Translation](/references/translation/models/Translation) in [Translation Module](../../translation/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#translation-module)
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductOption](/references/product/models/ProductOption)
</Table.Cell>
<Table.Cell>
[Translation](/references/translation/models/Translation) in [Translation Module](../../translation/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#translation-module)
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductOptionValue](/references/product/models/ProductOptionValue)
</Table.Cell>
<Table.Cell>
[Translation](/references/translation/models/Translation) in [Translation Module](../../translation/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#translation-module)
</Table.Cell>
</Table.Row>
</Table.Body> </Table.Body>
</Table> </Table>
@@ -624,3 +736,72 @@ createRemoteLinkStep({
</CodeTab> </CodeTab>
</CodeTabs> </CodeTabs>
---
## Translation Module
<Prerequisites
items={[
{
title: "Translation Module",
link: "/commerce-modules/translation",
},
]}
/>
Medusa defines read-only links from several data models in the Product Module to the [Translation](/references/translation/models/Translation) data model in the [Translation Module](../../translation/page.mdx):
- `Product` (one-to-many) to `Translation`, and vice versa.
- `ProductVariant` (one-to-many) to `Translation`. You can only retrieve the translations of a product variant, and not the other way around.
- `ProductCategory` (one-to-many) to `Translation`. You can only retrieve the translations of a product category, and not the other way around.
- `ProductCollection` (one-to-many) to `Translation`. You can only retrieve the translations of a product collection, and not the other way around.
- `ProductTag` (one-to-many) to `Translation`. You can only retrieve the translations of a product tag, and not the other way around.
- `ProductType` (one-to-many) to `Translation`. You can only retrieve the translations of a product type, and not the other way around.
- `ProductOption` (one-to-many) to `Translation`. You can only retrieve the translations of a product option, and not the other way around.
- `ProductOptionValue` (one-to-many) to `Translation`. You can only retrieve the translations of a product option value, and not the other way around.
### Retrieve with Query
To retrieve the translations of a product with [Query](!docs!/learn/fundamentals/module-links/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.
</Note>
<CodeTabs group="relation-query">
<CodeTab label="query.graph" value="method">
```ts
const { data: products } = await query.graph({
entity: "product",
fields: [
"translations.*",
],
})
// products[0].translations
```
</CodeTab>
<CodeTab label="useQueryGraphStep" value="step">
```ts
import { useQueryGraphStep } from "@medusajs/medusa/core-flows"
// ...
const { data: products } = useQueryGraphStep({
entity: "product",
fields: [
"translations.*",
],
})
// products[0].translations
```
</CodeTab>
</CodeTabs>
@@ -3,7 +3,7 @@ products:
- currency - currency
--- ---
import { CodeTabs, CodeTab, Table } from "docs-ui" import { CodeTabs, CodeTab, Table, Prerequisites } from "docs-ui"
export const metadata = { export const metadata = {
title: `Links between Store Module and Other Modules`, title: `Links between Store Module and Other Modules`,
@@ -55,6 +55,20 @@ Read-only links are used to query data across modules, but the relations aren't
[Learn more](#currency-module) [Learn more](#currency-module)
</Table.Cell> </Table.Cell>
</Table.Row> </Table.Row>
<Table.Row>
<Table.Cell>
[StoreLocale](/references/store/models/StoreLocale)
</Table.Cell>
<Table.Cell>
[Locale](/references/translation/models/Locale) in [Translation Module](../../translation/page.mdx)
</Table.Cell>
<Table.Cell>
Read-only - has many
</Table.Cell>
<Table.Cell>
[Learn more](#translation-module)
</Table.Cell>
</Table.Row>
</Table.Body> </Table.Body>
</Table> </Table>
@@ -62,9 +76,9 @@ Read-only links are used to query data across modules, but the relations aren't
## Currency Module ## Currency Module
The Store Module has a `Currency` data model that stores the supported currencies of a store. However, these currencies don't hold all the details of a currency, such as its name or symbol. The Store Module has a `StoreCurrency` data model that stores the supported currencies of a store. However, these currencies don't hold all the details of a currency, such as its name or symbol.
Instead, Medusa defines a read-only link between the [Currency Module](../../currency/page.mdx)'s `Currency` data model and the Store Module's `StoreCurrency` data model. This means you can retrieve the details of a store's supported currencies, but you don't manage the links in a pivot table in the database. The currencies of a store are determined by the `currency_code` of the [Currency](/references/store/models/StoreCurrency) data model in the Store Module (not in the Currency Module). Instead, Medusa defines a read-only link from the Store Module's `StoreCurrency` data model to the [Currency Module](../../currency/page.mdx)'s `Currency` data model. This means you can retrieve the details of a store's supported currencies, but you don't manage the links in a pivot table in the database.
### Retrieve with Query ### Retrieve with Query
@@ -104,3 +118,60 @@ const { data: stores } = useQueryGraphStep({
</CodeTab> </CodeTab>
</CodeTabs> </CodeTabs>
---
## Translation Module
<Prerequisites
items={[
{
text: "Translation Module Configured",
link: "/commerce-modules/translation#configure-translation-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](../../translation/page.mdx)'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](!docs!/learn/fundamentals/module-links/query), pass `supported_locales.locale.*` in `fields`:
<CodeTabs group="relation-query">
<CodeTab label="query.graph" value="method">
```ts
const { data: stores } = await query.graph({
entity: "store",
fields: [
"supported_locales.locale.*",
],
})
// stores[0].supported_locales[0].locale
```
</CodeTab>
<CodeTab label="useQueryGraphStep" value="step">
```ts
import { useQueryGraphStep } from "@medusajs/medusa/core-flows"
// ...
const { data: stores } = useQueryGraphStep({
entity: "store",
fields: [
"supported_locales.locale.*",
],
})
// stores[0].supported_locales[0].locale
```
</CodeTab>
</CodeTabs>
@@ -0,0 +1,34 @@
import { Prerequisites } from "docs-ui"
export const metadata = {
title: `Store Locales`,
}
# {metadata.title}
In this guide, you'll learn about locales defined in the Store Module.
<Prerequisites
items={[
{
text: "Medusa v2.12.3 or later",
link: "https://github.com/medusajs/medusa/releases/tag/v2.12.3",
},
]}
/>
<Note>
While the Store Module allows you to manage the locales for your store, the actual locale data and translations are managed by the [Translation Module](../../translation/page.mdx).
</Note>
## Supported Locales
The Store Module has a [StoreLocale](/references/store/models/StoreLocale) data model that represents the locales supported by your store. It has a `locale_code` property that follows the [IETF BCP 47 standard](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1). For example, `en-US` represents American English, while `fr-FR` represents French (France).
`StoreLocale` belongs to the [Store](/references/store/models/Store) data model, which has a `supported_locales` property that lists all the locales available in your store.
For example, if your store supports English (United States) and French (France), you'll have two `StoreLocale` records with the locale codes `en-US` and `fr-FR`.
![Diagram illustrating the relationship between the Store and StoreLocale data models](https://res.cloudinary.com/dza7lstvk/image/upload/v1765371144/Medusa%20Resources/store-locale_ckanv4.jpg)
@@ -0,0 +1,129 @@
import { Prerequisites } from "docs-ui"
export const metadata = {
title: `Translation Concepts`,
}
# {metadata.title}
In this guide, you'll learn about the key concepts related to the Translation Module, including locales and translations.
<Prerequisites
items={[
{
text: "Translation Module Configured",
link: "/commerce-modules/translation#configure-translation-module",
},
]}
/>
## Locales
The [Locale data model](/references/translation/models/Locale) represents a language that resources can be translated into.
Its `code` property follows the [IETF BCP 47 standard](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1). For example, `en-US` represents American English, while `fr-FR` represents French (France).
Locales are automatically populated in your Medusa application the first time the Translation Module is used.
### Default Locale
The Translation Module doesn't enforce a default locale. If a resource doesn't have a translation in the requested locale, it will fall back to the original value stored in the resource's data model.
---
## Translations
The [Translation data model](/references/translation/models/Translation) represents a translated value for a specific resource in a specific locale.
The data model has the following properties to associate the translation with the resource:
- `reference_id`: The ID of the resource being translated (for example, the ID of the product being translated).
- `reference`: The name of the table where the resource is stored (for example, `product` when translating a product).
The locale of the translation is indicated by the `locale_code` property, which follows the same [IETF BCP 47 standard](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1) as the [Locale](#locales) data model.
A resource may have only one translation per locale. For example, a product can have only one translation in `fr-FR` and another translation in `es-ES`.
The actual translated values are stored in the `translations` property, which is a JSON object where each key represents a field of the resource being translated, and the value is the translated text.
For example, a translation for a product to French (`fr-FR`) may look like this:
```json
{
"reference_id": "prod_123",
"reference": "product",
"locale_code": "fr-FR",
"translations": {
"title": "Produit Exemple",
"description": "Ceci est une description en français."
}
}
```
Each key in the `translations` object corresponds to a property in the product resource, such as `title` and `description`, with their respective translated values.
---
## Retrieve Translations in Medusa
<Note>
To retrieve translations for the storefront, refer to the [Serve Translations in the Storefront](../storefront/page.mdx) guide.
</Note>
You can retrieve translations for a resource on the Medusa server using [Query](!docs!/learn/fundamentals/module-links/query). You can filter translations by `reference_id` and `locale_code` to get the specific translation you need.
For example:
```ts
const { data: translations } = await query.graph({
entity: "translation",
fields: ["reference_id", "locale_code", "translations"],
filters: {
reference_id: "prod_123",
locale_code: "fr-FR",
},
})
console.log(translations)
// Output:
// [{
// reference_id: "prod_123",
// locale_code: "fr-FR",
// translations: {
// title: "Produit Exemple",
// description: "Ceci est une description en français."
// }
// }]
```
In this example, you retrieve the translation records of a product with the ID `prod_123` in French (`fr-FR`).
If you've enabled the [Caching Module](../../../infrastructure-modules/caching/page.mdx) in your Medusa application, you can also cache translation queries to improve performance:
```ts
const { data: translations } = await query.graph({
entity: "translation",
fields: ["reference_id", "locale_code", "translations"],
filters: {
reference_id: "prod_123",
locale_code: "fr-FR",
},
}, {
cache: {
enable: true,
},
})
console.log(translations)
// Output:
// [{
// reference_id: "prod_123",
// locale_code: "fr-FR",
// translations: {
// title: "Produit Exemple",
// description: "Ceci est une description en français."
// }
// }]
```
@@ -0,0 +1,15 @@
import { ChildDocs } from "docs-ui"
export const metadata = {
title: `Translation JS SDK Methods`,
}
# {metadata.title}
The [JS SDK](../../../js-sdk/page.mdx) allows you to send requests to the Medusa server application from your client applications, such as a storefront or the Medusa Admin dashboard.
Use the following methods or properties to send requests to Translation related API routes in your Medusa application. They are provided by the `@medusajs/js-sdk` package.
The following links will take you to the reference documentation for the [JS SDK](../../../js-sdk/page.mdx).
<ChildDocs type="item" />
@@ -0,0 +1,370 @@
---
products:
- product
- store
---
import { CodeTabs, CodeTab, Table } from "docs-ui"
export const metadata = {
title: `Links between Translation Module and Other Modules`,
}
# {metadata.title}
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:
<Table>
<Table.Header>
<Table.Row>
<Table.HeaderCell>
First Data Model
</Table.HeaderCell>
<Table.HeaderCell>
Second Data Model
</Table.HeaderCell>
<Table.HeaderCell>
Type
</Table.HeaderCell>
<Table.HeaderCell>
Description
</Table.HeaderCell>
</Table.Row>
</Table.Header>
<Table.Body>
<Table.Row>
<Table.Cell>
[Product](/references/product/models/Product) in [Product Module](../../product/page.mdx)
</Table.Cell>
<Table.Cell>
[Translation](/references/translation/models/Translation)
</Table.Cell>
<Table.Cell>
Read-only - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#product-module)
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductVariant](/references/product/models/ProductVariant) in [Product Module](../../product/page.mdx)
</Table.Cell>
<Table.Cell>
[Translation](/references/translation/models/Translation)
</Table.Cell>
<Table.Cell>
Read-only - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#product-module)
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductCategory](/references/product/models/ProductCategory) in [Product Module](../../product/page.mdx)
</Table.Cell>
<Table.Cell>
[Translation](/references/translation/models/Translation)
</Table.Cell>
<Table.Cell>
Read-only - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#product-module)
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductCollection](/references/product/models/ProductCollection) in [Product Module](../../product/page.mdx)
</Table.Cell>
<Table.Cell>
[Translation](/references/translation/models/Translation)
</Table.Cell>
<Table.Cell>
Read-only - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#product-module)
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductTag](/references/product/models/ProductTag) in [Product Module](../../product/page.mdx)
</Table.Cell>
<Table.Cell>
[Translation](/references/translation/models/Translation)
</Table.Cell>
<Table.Cell>
Read-only - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#product-module)
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductType](/references/product/models/ProductType) in [Product Module](../../product/page.mdx)
</Table.Cell>
<Table.Cell>
[Translation](/references/translation/models/Translation)
</Table.Cell>
<Table.Cell>
Read-only - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#product-module)
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductOption](/references/product/models/ProductOption) in [Product Module](../../product/page.mdx)
</Table.Cell>
<Table.Cell>
[Translation](/references/translation/models/Translation)
</Table.Cell>
<Table.Cell>
Read-only - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#product-module)
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductOptionValue](/references/product/models/ProductOptionValue) in [Product Module](../../product/page.mdx)
</Table.Cell>
<Table.Cell>
[Translation](/references/translation/models/Translation)
</Table.Cell>
<Table.Cell>
Read-only - one-to-many
</Table.Cell>
<Table.Cell>
[Learn more](#product-module)
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[StoreLocale](/references/store/models/StoreLocale) in [Store Module](../../store/page.mdx)
</Table.Cell>
<Table.Cell>
[Locale](/references/translation/models/Locale)
</Table.Cell>
<Table.Cell>
Read-only - has many
</Table.Cell>
<Table.Cell>
[Learn more](#store-module)
</Table.Cell>
</Table.Row>
</Table.Body>
</Table>
---
## Product Module
Medusa defines the following read-only links between the Translation and Product Modules:
<Table>
<Table.Header>
<Table.Row>
<Table.HeaderCell>
Data Model
</Table.HeaderCell>
<Table.HeaderCell>
Link Type
</Table.HeaderCell>
<Table.HeaderCell>
Description
</Table.HeaderCell>
</Table.Row>
</Table.Header>
<Table.Body>
<Table.Row>
<Table.Cell>
[Product](/references/product/models/Product) \<-\> [Translation](/references/translation/models/Translation)
</Table.Cell>
<Table.Cell>
One-to-many (bidirectional)
</Table.Cell>
<Table.Cell>
Retrieve translations associated with a product and vice versa.
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductVariant](/references/product/models/ProductVariant) -> [Translation](/references/translation/models/Translation)
</Table.Cell>
<Table.Cell>
One-to-many (read-only)
</Table.Cell>
<Table.Cell>
Retrieve translations of a product variant only.
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductCategory](/references/product/models/ProductCategory) -> [Translation](/references/translation/models/Translation)
</Table.Cell>
<Table.Cell>
One-to-many (read-only)
</Table.Cell>
<Table.Cell>
Retrieve translations of a product category only.
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductCollection](/references/product/models/ProductCollection) -> [Translation](/references/translation/models/Translation)
</Table.Cell>
<Table.Cell>
One-to-many (read-only)
</Table.Cell>
<Table.Cell>
Retrieve translations of a product collection only.
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductTag](/references/product/models/ProductTag) -> [Translation](/references/translation/models/Translation)
</Table.Cell>
<Table.Cell>
One-to-many (read-only)
</Table.Cell>
<Table.Cell>
Retrieve translations of a product tag only.
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductType](/references/product/models/ProductType) -> [Translation](/references/translation/models/Translation)
</Table.Cell>
<Table.Cell>
One-to-many (read-only)
</Table.Cell>
<Table.Cell>
Retrieve translations of a product type only.
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductOption](/references/product/models/ProductOption) -> [Translation](/references/translation/models/Translation)
</Table.Cell>
<Table.Cell>
One-to-many (read-only)
</Table.Cell>
<Table.Cell>
Retrieve translations of a product option only.
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
[ProductOptionValue](/references/product/models/ProductOptionValue) -> [Translation](/references/translation/models/Translation)
</Table.Cell>
<Table.Cell>
One-to-many (read-only)
</Table.Cell>
<Table.Cell>
Retrieve translations of a product option value only.
</Table.Cell>
</Table.Row>
</Table.Body>
</Table>
### Retrieve with Query
To retrieve the translations of a product with [Query](!docs!/learn/fundamentals/module-links/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.
</Note>
<CodeTabs group="relation-query">
<CodeTab label="query.graph" value="method">
```ts
const { data: products } = await query.graph({
entity: "product",
fields: [
"translations.*",
],
})
// products[0].translations
```
</CodeTab>
<CodeTab label="useQueryGraphStep" value="step">
```ts
import { useQueryGraphStep } from "@medusajs/medusa/core-flows"
// ...
const { data: products } = useQueryGraphStep({
entity: "product",
fields: [
"translations.*",
],
})
// products[0].translations
```
</CodeTab>
</CodeTabs>
---
## Store Module
The [Store Module](../../store/page.mdx) 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](!docs!/learn/fundamentals/module-links/query), pass `supported_locales.locale.*` in `fields`:
<CodeTabs group="relation-query">
<CodeTab label="query.graph" value="method">
```ts
const { data: stores } = await query.graph({
entity: "store",
fields: [
"supported_locales.locale.*",
],
})
// stores[0].supported_locales[0].locale
```
</CodeTab>
<CodeTab label="useQueryGraphStep" value="step">
```ts
import { useQueryGraphStep } from "@medusajs/medusa/core-flows"
// ...
const { data: stores } = useQueryGraphStep({
entity: "store",
fields: [
"supported_locales.locale.*",
],
})
// stores[0].supported_locales[0].locale
```
</CodeTab>
</CodeTabs>
@@ -0,0 +1,222 @@
---
generate_toc: true
---
import { CodeTabs, CodeTab, ChildDocs, Prerequisites } from "docs-ui"
export const metadata = {
title: `Translation Module`,
}
# {metadata.title}
In this section of the documentation, you will find resources to learn more about the Translation Module and how to use it in your application.
<Prerequisites
items={[
{
text: "Medusa v2.12.3 or later",
link: "https://github.com/medusajs/medusa/releases/tag/v2.12.3"
},
{
text: "Translation Feature Flag Enabled",
link: "#"
}
]}
/>
<Note title="Looking for no-code docs?">
Refer to the [Medusa Admin User Guide](!user-guide!/settings/translations) to learn how to manage translations in the dashboard.
</Note>
Medusa has translation features available out-of-the-box through the Translation Module. A [module](!docs!/learn/fundamentals/modules) is a standalone package that provides features for a single domain. Each of Medusa's commerce features is provided in Commerce Modules, such as the Translation Module.
<Note>
Refer to the [Module Isolation](!docs!/learn/fundamentals/modules/isolation) guide to learn more about why modules are isolated.
</Note>
## Translation Features
- [Translation and Locale Management](./concepts/page.mdx): Manage locales and add translations for different resources in your store.
- [Multi-Language Support](./storefront/page.mdx): Manage and serve resources like products in multiple languages to cater to a diverse customer base.
---
## Configure Translation Module
The Translation Module is currently behind a feature flag. To use it in your Medusa application, add it to the `modules` array and enable the `translation` feature flag.
In your `medusa-config.ts` file, add the Translation Module to the `modules` array and enable the `translation` feature flag:
```ts title="medusa-config.ts"
module.exports = defineConfig({
// ...
modules: [
// other modules...
{
resolve: "@medusajs/medusa/translation",
},
],
featureFlags: {
translation: true,
},
})
```
Then, run the following command to make the necessary database changes for the Translation Module:
```bash
npx medusa db:migrate
```
You can then use the Translation Module in your Medusa application.
---
## How to Use the Translation Module
In your Medusa application, you build flows around Commerce Modules. A flow is built as a [Workflow](!docs!/learn/fundamentals/workflows), which is a special function composed of a series of steps that guarantees data consistency and a reliable rollback mechanism.
You can build custom workflows and steps. You can also re-use Medusa's workflows and steps, which are provided by the `@medusajs/medusa/core-flows` package.
For example:
export const highlights = [
["12", "Modules.TRANSLATION", "Resolve the module in a step."]
]
```ts title="src/workflows/create-translation.ts" highlights={highlights}
import {
createWorkflow,
WorkflowResponse,
createStep,
StepResponse,
} from "@medusajs/framework/workflows-sdk"
import { Modules } from "@medusajs/framework/utils"
const createTranslationStep = createStep(
"create-translation",
async ({}, { container }) => {
const translationModuleService = container.resolve(Modules.TRANSLATION)
const translation = await translationModuleService.createTranslations({
reference_id: "product_123",
reference: "product",
locale_code: "fr-FR",
translations: {
title: "Produit Exemple",
description: "Ceci est une description en français.",
},
})
return new StepResponse({ translation }, translation.id)
},
async (translationId, { container }) => {
const translationModuleService = container.resolve(Modules.TRANSLATION)
await translationModuleService.deleteTranslations([translationId])
}
)
export const createTranslationWorkflow = createWorkflow(
"create-translation",
() => {
const { translation } = createTranslationStep()
return new WorkflowResponse({
translation,
})
}
)
```
You can then execute the workflow in your custom API routes, scheduled jobs, or subscribers:
<CodeTabs group="resource-types">
<CodeTab label="API Route" value="api-route">
```ts title="src/api/workflow/route.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports"
import type {
MedusaRequest,
MedusaResponse,
} from "@medusajs/framework/http"
import { createTranslationWorkflow } from "../../workflows/create-translation"
export async function GET(
req: MedusaRequest,
res: MedusaResponse
) {
const { result } = await createTranslationWorkflow(req.scope)
.run()
res.send(result)
}
```
</CodeTab>
<CodeTab label="Subscriber" value="subscriber">
```ts title="src/subscribers/user-created.ts" highlights={[["11"], ["12"]]} collapsibleLines="1-6" expandButtonLabel="Show Imports"
import {
type SubscriberConfig,
type SubscriberArgs,
} from "@medusajs/framework"
import { createTranslationWorkflow } from "../workflows/create-translation"
export default async function handleUserCreated({
event: { data },
container,
}: SubscriberArgs<{ id: string }>) {
const { result } = await createTranslationWorkflow(container)
.run()
console.log(result)
}
export const config: SubscriberConfig = {
event: "user.created",
}
```
</CodeTab>
<CodeTab label="Scheduled Job" value="scheduled-job">
```ts title="src/jobs/run-daily.ts" highlights={[["7"], ["8"]]}
import { MedusaContainer } from "@medusajs/framework/types"
import { createTranslationWorkflow } from "../workflows/create-translation"
export default async function myCustomJob(
container: MedusaContainer
) {
const { result } = await createTranslationWorkflow(container)
.run()
console.log(result)
}
export const config = {
name: "run-once-a-day",
schedule: `0 0 * * *`,
}
```
</CodeTab>
</CodeTabs>
Refer to the [Workflows](!docs!/learn/fundamentals/workflows) documentation to learn more.
---
## Supported Module Translations
The Translation Module currently supports translations for all data models in the [Product Module](../product/page.mdx), including products, product variants, and categories.
Future versions of the Translation Module will include support for all Commerce Modules, as well as custom modules.
---
<CommerceModuleSections />
@@ -0,0 +1,114 @@
---
products:
- store
- product
- cart
---
import { Prerequisites, CodeTabs } from "docs-ui"
export const metadata = {
title: `Serve Translations in the Storefront`,
}
# {metadata.title}
In this guide, you’ll learn how to use locales and serve translated content in your storefront application in your Medusa application.
<Prerequisites
items={[
{
text: "Translation Module Configured",
link: "/commerce-modules/translation#configure-translation-module",
},
]}
/>
## Fetch Store Locales
You can retrieve the list of locales available in your store using the [List Locales Store API route](!api!/store#locales_getlocales). You can display this list to customers, allowing them to select their preferred language.
For example, to fetch the list of locales, send a `GET` request to the following endpoint:
```bash
curl "http://localhost:9000/store/locales" \
-H 'x-publishable-api-key: {your_publishable_api_key}'
```
Learn more in the [Localization](../../../storefront-development/localization/page.mdx) storefront guide.
<Note title="Tip">
You must pass a publishable API key in the request header to store API routes. Learn more in the [Store API reference](!api!/store#publishable-api-key).
</Note>
---
## Retrieve Translations for Resources
Currently, you can retrieve translations using the [Store API routes](!api!/store) for product-related resources, such as products, product variants, and categories. Future releases will expand translation support to additional resources.
Medusa determines the locale for the request in the following order of priority:
- The `locale` query parameter in the API request.
- The `x-medusa-locale` header in the API request.
If translations aren't available for the selected locale, or no locale is selected, the original content stored in the resource's data model is returned.
For example:
```bash
curl "http://localhost:9000/store/products?locale=fr-FR" \
-H 'x-publishable-api-key: {your_publishable_api_key}'
```
This returns the list of products with their French (France) translations if available:
```json
{
"products": [
{
"id": "prod_123",
"title": "Produit Exemple",
"description": "Ceci est une description en français.",
// other product fields...
},
// other products...
]
}
```
Learn more in the [List Products](../../../storefront-development/products/list/page.mdx#retrieve-translations-for-products) storefront guide.
---
## Set a Cart's Locale
A cart can have a locale, which determines the language of the item contents. You can set the locale when creating the cart and update it if the user changes their language preference.
For example, when creating a cart, set the `locale` property in the request body:
```bash
curl -X POST "http://localhost:9000/store/carts" \
-H 'x-publishable-api-key: {your_publishable_api_key}' \
-H "Content-Type: application/json" \
-d '{
// other cart properties...
"locale": "fr-FR"
}'
```
This creates a cart with the French (France) locale. When you add items to the cart, their titles and descriptions are displayed in French if translations are available.
If you don't specify a locale when creating the cart, the original product content is used for the items in the cart.
Learn more in the [Create Cart](../../../storefront-development/cart/create/page.mdx) and [Update Cart](../../../storefront-development/cart/update/page.mdx) storefront guides.
---
## Locale of Placed Order
When a cart is completed and an order is placed, the locale of the cart is copied to the order. The content of items in the order is displayed in the locale that was set in the cart.
This ensures that customers see order details in their preferred language.
@@ -0,0 +1,15 @@
import { ChildDocs } from "docs-ui"
export const metadata = {
title: `Translation Workflows`,
}
# {metadata.title}
[Workflows](!docs!/learn/fundamentals/workflows) are a series of queries and actions, called steps, that complete a task. By using workflows, you benefit from features like data consistency and a reliable roll-back mechanism.
When building your customizations, it's highly recommended to re-use Medusa's existing workflows and steps where possible. The following workflows and steps allow you to manage Translations and use their features in your Medusa application. They are provided by the `@medusajs/medusa/core-flows` package.
The following links will take you to the reference documentation for [Medusa's Core Workflows](/medusa-workflows-reference).
<ChildDocs type="item" defaultItemsPerRow={2} />
@@ -42,6 +42,12 @@ export const metadata = {
In this tutorial, you'll learn how to localize your Medusa store's data with Contentful. In this tutorial, you'll learn how to localize your Medusa store's data with Contentful.
<Note title="Tip">
[Translation Module](../../../commerce-modules/translation/page.mdx) is available since [Medusa v2.12.3](https://github.com/medusajs/medusa/releases/tag/v2.12.3). It allows you to manage translations for product-related resources through Medusa's Store API routes. For general localization needs, consider using the Translation Module instead of integrating a third-party CMS.
</Note>
When you install a Medusa application, you get a fully-fledged commerce platform with a Framework for customization. While Medusa provides features essential for internationalization, such as support for multiple [regions](../../../commerce-modules/region/page.mdx) and [currencies](../../../commerce-modules/currency/page.mdx), it doesn't provide content localization. When you install a Medusa application, you get a fully-fledged commerce platform with a Framework for customization. While Medusa provides features essential for internationalization, such as support for multiple [regions](../../../commerce-modules/region/page.mdx) and [currencies](../../../commerce-modules/currency/page.mdx), it doesn't provide content localization.
However, Medusa's architecture supports the integration of third-party services to provide additional features, such as data localization. One service you can integrate is [Contentful](https://www.contentful.com/), a headless content management system (CMS) that allows you to manage and deliver content across multiple channels. However, Medusa's architecture supports the integration of third-party services to provide additional features, such as data localization. One service you can integrate is [Contentful](https://www.contentful.com/), a headless content management system (CMS) that allows you to manage and deliver content across multiple channels.
+43 -1
View File
@@ -1,4 +1,4 @@
import { CodeTabs, CodeTab, Table } from "docs-ui" import { CodeTabs, CodeTab, Table, Prerequisites } from "docs-ui"
export const metadata = { export const metadata = {
title: `Medusa JS SDK`, title: `Medusa JS SDK`,
@@ -651,6 +651,48 @@ The JS SDK appends request-specific headers to authentication headers and header
--- ---
## Localization with JS SDK
<Prerequisites
items={[
{
text: "Translation Module Configured",
link: "/commerce-modules/translation#configure-translation-module",
}
]}
/>
If you support [localization](../storefront-development/localization/page.mdx) in your storefront, you can use the `setLocale` method of the JS SDK.
The `setLocale` method stores the locale in the JS SDK to pass the it as a `x-medusa-locale` header in all subsequent requests. Also, if your application supports `localStorage`, the method sets the locale in the `medusa_locale` key of the `localStorage`.
For example, to set the locale to French (France):
```ts
sdk.setLocale("fr-FR")
// products content is fetched in French
const { products } = await sdk.store.product.list()
```
The `setLocale` method accepts the locale string in the [IETF BCP 47 standard](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1). All subsequent requests sent using the JS SDK will include the specified locale in the `x-medusa-locale` header.
In the above example, the product content, such as title and description, is fetched in French and falls back to the original content if translations aren't available.
You can also retrieve the currently set locale using the `getLocale` method:
```ts
const currentLocale = sdk.getLocale()
console.log(currentLocale) // "fr-FR"
```
<Note>
Learn more about localization and translations in the [Translation Module](../commerce-modules/translation/page.mdx) guide.
</Note>
---
## Medusa JS SDK Tips ## Medusa JS SDK Tips
### Use Tanstack (React) Query in Admin Customizations ### Use Tanstack (React) Query in Admin Customizations
@@ -145,21 +145,27 @@ A multi-regional setup lets merchants manage their inventory through Medusa acro
## Multi-Lingual Setup ## Multi-Lingual Setup
By integrating a third-party Content Management Systems (CMS), you benefit from rich content features including managing your content in multiple languages. This allows you to cater to customers’ different languages in the regions you serve. Medusa's [Translation Module](../../commerce-modules/translation/page.mdx) allows merchants to manage translations for product-related resources through Medusa's Store API routes.
To integrate a third-party system, create a custom module whose main service connects to that third-party service. You can also follow the [Contentful integration guide](../../integrations/guides/contentful/page.mdx) to learn how to integrate Contentful and benefit from localization features. This enables merchants to provide a localized experience for customers in different regions by serving translated content in their storefront applications.
<Note>
Future versions of the Translation Module will expand translation support to additional resources beyond product-related ones.
</Note>
<CardList items={[ <CardList items={[
{ {
href: "!docs!/learn/fundamentals/modules", href: "!user-guide!/settings/translations",
title: "Create a Module", title: "Manage Translations",
text: "Learn how to create a module in Medusa.", text: "Learn how to manage translations in the Medusa Admin.",
icon: AcademicCapSolid, icon: UsersSolid,
}, },
{ {
href: "/integrations/guides/contentful", href: "/storefront-development/localization",
title: "Integrate Contentful", title: "Localizing Storefronts",
text: "Integrate Contentful with Localization Features.", text: "Learn how to localize your storefront applications.",
icon: AcademicCapSolid, icon: AcademicCapSolid,
}, },
]} /> ]} />
@@ -6,7 +6,7 @@ products:
- cart - cart
--- ---
import { CodeTabs, CodeTab } from "docs-ui" import { CodeTabs, CodeTab, Prerequisites } from "docs-ui"
export const metadata = { export const metadata = {
title: `Create Cart in Storefront`, title: `Create Cart in Storefront`,
@@ -132,6 +132,39 @@ However, if the cart is created for a guest customer, then the customer logs in,
--- ---
## Set Cart's Locale
<Prerequisites
items={[
{
text: "Translation Module Configured",
link: "/commerce-modules/translation#configure-translation-module",
}
]}
/>
By default, items in the cart will have their associated product's original content. If your storefront supports [localization](../../localization/page.mdx), you can set the cart's locale to ensure that the item contents are in the customer's preferred language.
You can set the cart's locale by passing the `locale` request body parameter to the [Create Cart API route](!api!/store#carts_postcarts). For example:
```ts
sdk.store.cart.create({
region_id: region.id,
// you can also retrieve the locale from sdk.getLocale()
locale: "fr-FR",
})
.then(({ cart }) => {
// TODO use the cart...
console.log(cart)
})
```
When the cart's locale is set, the cart's items will have their content in the specified locale if translations are available.
You can also [update the cart's locale](../update/page.mdx#set-cart-locale) later if the customer changes their language preference.
---
## Store Cart Details in React Context ## Store Cart Details in React Context
If you're using React, it's then recommended to create a context that stores the cart details and make it available to all components in your application, as explained in the [Cart React Context in Storefront](../context/page.mdx) guide. If you're using React, it's then recommended to create a context that stores the cart details and make it available to all components in your application, as explained in the [Cart React Context in Storefront](../context/page.mdx) guide.
@@ -7,7 +7,7 @@ products:
- customer - customer
--- ---
import { CodeTabs, CodeTab } from "docs-ui" import { CodeTabs, CodeTab, Prerequisites } from "docs-ui"
export const metadata = { export const metadata = {
title: `Update Cart in Storefront`, title: `Update Cart in Storefront`,
@@ -86,3 +86,33 @@ Learn more about authenticating customers with the JS SDK in the [Login Customer
When using the Fetch API to send the request, either use `credentials: include` if the customer is already authenticated with a cookie session, or pass the Authorization Bearer token in the request's header. When using the Fetch API to send the request, either use `credentials: include` if the customer is already authenticated with a cookie session, or pass the Authorization Bearer token in the request's header.
</Note> </Note>
---
## Set Cart's Locale
<Prerequisites
items={[
{
text: "Translation Module Configured",
link: "/commerce-modules/translation#configure-translation-module",
}
]}
/>
By default, items in the cart will have their associated product's original content. If your storefront supports [localization](../../localization/page.mdx), you can set the cart's locale to ensure that the item contents are in the customer's preferred language.
You can set the cart's locale by passing the `locale` request body parameter to the [Update Cart API route](!api!/store#carts_postcarts). For example:
```ts
sdk.store.cart.update(cartId, {
// you can also retrieve the locale from sdk.getLocale()
locale: "fr-FR",
})
.then(({ cart }) => {
// TODO use the cart...
console.log(cart)
})
```
When the cart's locale is set, existing and new items in the cart will have their content in the specified locale if translations are available.
@@ -10,7 +10,7 @@ products:
- payment - payment
--- ---
import { CodeTabs, CodeTab } from "docs-ui" import { CodeTabs, CodeTab, Prerequisites } from "docs-ui"
export const metadata = { export const metadata = {
title: `Checkout Step 5: Complete Cart`, title: `Checkout Step 5: Complete Cart`,
@@ -57,6 +57,23 @@ When the cart completion is successful, it's important to unset the cart ID from
--- ---
## Order's Locale after Cart Completion
<Prerequisites
items={[
{
text: "Translation Module Configured",
link: "/commerce-modules/translation#configure-translation-module",
}
]}
/>
When you complete the cart, items in the order will be in the locale that was set for the cart. This ensures that the customer sees the order details in their preferred language.
If no locale was set for the cart, then the order's items will be in the original product content.
---
## React Example with Default System Payment Provider ## React Example with Default System Payment Provider
For example, to complete the cart when the default system payment provider is used: For example, to complete the cart when the default system payment provider is used:
@@ -6,7 +6,7 @@ products:
- order - order
--- ---
import { CodeTabs, CodeTab, Table } from "docs-ui" import { CodeTabs, CodeTab, Table, Prerequisites } from "docs-ui"
export const metadata = { export const metadata = {
title: `Order Confirmation in Storefront`, title: `Order Confirmation in Storefront`,
@@ -144,6 +144,21 @@ return (
In the above example, you show the order items in a list, displaying the item's title, quantity, and unit price formatted with the `formatPrice` function. In the above example, you show the order items in a list, displaying the item's title, quantity, and unit price formatted with the `formatPrice` function.
### Locale of Order Items
<Prerequisites
items={[
{
text: "Translation Module Configured",
link: "/commerce-modules/translation#configure-translation-module",
}
]}
/>
When you complete the cart, items in the order will be in the locale that was set for the cart. This ensures that the customer sees the order details in their preferred language.
If no locale was set for the cart, then the order's items will be in the original product content.
--- ---
## Show Order Totals ## Show Order Totals
@@ -0,0 +1,231 @@
---
tags:
- translation
- storefront
products:
- translation
---
import { Prerequisites, CodeTabs, CodeTab } from "docs-ui"
export const metadata = {
title: `Storefront Localization`,
}
# {metadata.title}
In this guide, you'll learn how to support multiple languages and locales in your storefront.
<Prerequisites
items={[
{
text: "Translation Module Configured",
link: "/commerce-modules/translation#configure-translation-module",
}
]}
/>
## Overview
Medusa provides localization features through the [Translation Module](../../commerce-modules/translation/page.mdx). The Translation Module allows you to manage locales and translations for various resources in your store, such as products and categories.
Admin users can [specify supported locales](!user-guide!/settings/store#manage-store-locales), and [add translations for different resources](!user-guide!/settings/translations) from the Medusa Admin. Then, you can allow customers to choose their locale and show them translated content in your storefront.
Refer to the [Translation Module documentation](../../commerce-modules/translation/page.mdx) to learn more about translation concepts and features. This guide focuses on how to serve localized content in your storefront.
---
## Retrieve Supported Locales
You can retrieve the list of locales supported by your store using the [List Locales Store API route](!api!/store#locales_getlocales). You can display this list to customers, allowing them to select their preferred language.
For example:
<Note title="Tip">
Learn how to install and configure the JS SDK in the [JS SDK documentation](../../js-sdk/page.mdx).
</Note>
<CodeTabs group="store-request">
<CodeTab label="React" value="react">
export const highlights = [
["18"], ["19"], ["20"], ["21"], ["22"]
]
```tsx highlights={highlights}
"use client" // include with Next.js 13+
import { useEffect, useState } from "react"
import { HttpTypes } from "@medusajs/types"
import { sdk } from "@/lib/sdk"
export default function Locales() {
const [loading, setLoading] = useState(true)
const [locales, setLocales] = useState<
HttpTypes.StoreLocale[]
>([])
useEffect(() => {
if (!loading) {
return
}
sdk.store.locale.list()
.then(({ locales: dataLocales }) => {
setLocales(dataLocales)
setLoading(false)
})
}, [loading])
return (
<div>
{loading && <span>Loading...</span>}
{!loading && locales.length === 0 && <span>No locales found.</span>}
{!loading && locales.length > 0 && (
<ul>
{locales.map((locale) => (
<li key={locale.code}>{locale.name}</li>
))}
</ul>
)}
</div>
)
}
```
</CodeTab>
<CodeTab label="JS SDK" value="js-sdk">
```ts
sdk.store.locale.list()
.then(({ locales: dataLocales }) => {
// TODO use locales...
console.log(dataLocales)
})
```
</CodeTab>
</CodeTabs>
The response has a `locales` field, which is an array of [locales](!api!/store#locales_locale_schema).
Each locale has a `code` property that follows the [IETF BCP 47 standard](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1). For example, `en-US` represents American English, while `fr-FR` represents French (France).
---
## Retrieve Translations for Resources
Currently, you can retrieve translations using the [Store API routes](!api!/store) for product-related resources, such as products, product variants, and categories. Future releases will expand translation support to additional resources.
By default, Medusa serves the original content of a resource. You can override the locale for a request to get the translated content if available.
### Set Locale in JS SDK
The JS SDK has a `setLocale` method that you can use to set the locale for subsequent requests.
The JS SDK will automatically include the `x-medusa-locale` header in API requests. Also, if your application supports `localStorage`, the method sets the locale in the `medusa_locale` key of the `localStorage`.
For example, when a customer selects a locale in your storefront, you can set the locale in the JS SDK:
```ts
sdk.setLocale("fr-FR")
// products content is fetched in French
const { products } = await sdk.store.product.list()
```
In the above example, you set the locale to French using the `setLocale` method. It accepts the locale string in the [IETF BCP 47 standard](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1).
When you fetch the products, their content, such as title and description, is in French and falls back to the original content if translations aren't available.
You can also retrieve the currently set locale using the `getLocale` method:
```ts
const currentLocale = sdk.getLocale()
console.log(currentLocale) // "fr-FR"
```
### Set Locale without JS SDK
If you're sending requests to the Store API without using the JS SDK, you can set the locale using either the `locale` query parameter or the `x-medusa-locale` header.
<CodeTabs group="set-locale">
<CodeTab label="Using Query Parameter" value="query-param">
```bash
curl "http://localhost:9000/store/products?locale=fr-FR" \
-H 'x-publishable-api-key: {your_publishable_api_key}'
```
</CodeTab>
<CodeTab label="Using Header" value="header">
```bash
curl "http://localhost:9000/store/products" \
-H 'x-publishable-api-key: {your_publishable_api_key}' \
-H "x-medusa-locale: fr-FR"
```
</CodeTab>
</CodeTabs>
Learn more in the [Store API reference](!api!/store#localization).
### Set Locale in Server Environments
If you're making Store API requests from a server environment (such as server components or server actions in Next.js), you can use cookies to persist the selected locale across requests.
When a customer selects a locale in your storefront, set a cookie (for example, `_medusa_locale`) with the selected locale value:
```ts
import { cookies } from "next/headers"
export const setLocale = async (locale: string) => {
const cookies_ = await cookies()
cookies_.set("_medusa_locale", locale, {
maxAge: 60 * 60 * 24 * 7,
})
}
```
Then, create a utility that returns the locale from the cookie as a `x-medusa-locale` header:
```ts
import { cookies } from "next/headers"
export const getLocaleHeader = async () => {
try {
const cookies_ = await cookies()
const locale = cookies_.get("_medusa_locale")?.value
return { "x-medusa-locale": locale }
} catch {
return {}
}
}
```
Finally, use the utility to set the `x-medusa-locale` header in your Store API requests:
```ts
import { getLocaleHeader } from "@/lib/locale"
export async function listProducts() {
const headers = {
...(await getLocaleHeader()),
}
return sdk.store.product.list({}, { headers })
}
```
### Retrieve Translated Products
When you pass the locale while fetching products, their content will be in the specified locale if translations are available. Learn more in the [List Products](../products/list/page.mdx) guide.
### Set Cart's Locale
When creating a cart, you should set the cart's locale to ensure that item contents are in the correct language. You can also update the cart's locale later if the customer changes their language preference.
Learn more in the [Create Cart](../cart/create/page.mdx) and [Update Cart](../cart/update/page.mdx) guides.
@@ -6,7 +6,7 @@ products:
- product - product
--- ---
import { CodeTabs, CodeTab } from "docs-ui" import { CodeTabs, CodeTab, Prerequisites } from "docs-ui"
export const metadata = { export const metadata = {
title: `Show Products in Storefront`, title: `Show Products in Storefront`,
@@ -225,3 +225,82 @@ sdk.store.product.list({
``` ```
The result will be products sorted by title in descending order. The result will be products sorted by title in descending order.
---
## Retrieve Translations for Products
<Prerequisites
items={[
{
text: "Translation Module Configured",
link: "/commerce-modules/translation#configure-translation-module",
}
]}
/>
By default, Medusa returns the product's original content (such as title and description).
If you support [localization](../../localization/page.mdx) in your storefront, you can set the locale to retrieve product information with based on the customer's preferred language.
You can set the locale using one of the following methods:
- Use the JS SDK's `setLocale` method. The JS SDK will automatically include the locale in subsequent requests.
- Pass the `locale` query parameter to the [List Products API route](!api!/store#products_getproducts).
- Set the `x-medusa-locale` header in the API request to the [List Products API route](!api!/store#products_getproducts).
For example:
<CodeTabs group="localized-products">
<CodeTab label="Using JS SDK" value="js-sdk">
```ts
sdk.setLocale("fr-FR")
sdk.store.product.list()
.then(({ products: dataProducts, count }) => {
// TODO set products...
})
```
</CodeTab>
<CodeTab label="Using Query Parameter" value="query-param">
```bash
curl "http://localhost:9000/store/products?locale=fr-FR" \
-H 'x-publishable-api-key: {your_publishable_api_key}'
```
</CodeTab>
<CodeTab label="Using Header" value="header">
```bash
curl "http://localhost:9000/store/products" \
-H 'x-publishable-api-key: {your_publishable_api_key}' \
-H "x-medusa-locale: fr-FR"
```
</CodeTab>
</CodeTabs>
The returned products will have the same structure as described in the [products schema](!api!/store#products_product_schema), but their fields like `title` and `description` will be in the specified locale:
```json
{
"products": [
{
"id": "prod_123",
"title": "Chemise Exemple",
"description": "Ceci est une description en français.",
// other product fields...
}
]
}
```
If translations aren't available for the selected locale, or no locale is selected, the product's original content is returned.
### Retrieve in Server-Side Environments
For server-side environments (such as server components or server actions in Next.js), you can set the locale using cookies to persist the selected locale across requests.
Learn more in the [Storefront Localization](../../localization/page.mdx#set-locale-in-server-environments) guide.
@@ -6,7 +6,7 @@ products:
- product - product
--- ---
import { CodeTabs, CodeTab } from "docs-ui" import { CodeTabs, CodeTab, Prerequisites } from "docs-ui"
export const metadata = { export const metadata = {
title: `Retrieve a Product in Storefront`, title: `Retrieve a Product in Storefront`,
@@ -70,7 +70,7 @@ export const highlights = [
setProduct(dataProduct) setProduct(dataProduct)
setLoading(false) setLoading(false)
}) })
}, [loading]) }, [loading, id])
return ( return (
<div> <div>
@@ -93,7 +93,7 @@ export const highlights = [
</ul> </ul>
)} )}
{product.images?.map((image) => ( {product.images?.map((image) => (
<img src={image.url} key={image.id} /> <img src={image.url} alt={product.title} key={image.id} />
))} ))}
</> </>
)} )}
@@ -132,7 +132,7 @@ Refer to the [Features in Product Details Page](#features-in-product-details-pag
## Retrieve a Product by Handle ## Retrieve a Product by Handle
To retrieve a product by its handle, send a request to the [List Products API route](!api!/store#products_getproducts) passing it the `handle` query parameter: To retrieve a product by its handle, send a request to the [List Products API route](!api!/store#products_getproducts) passing the `handle` query parameter:
<CodeTabs group="store-request"> <CodeTabs group="store-request">
<CodeTab label="React" value="react"> <CodeTab label="React" value="react">
@@ -174,7 +174,7 @@ export const handleHighlights = [
} }
setLoading(false) setLoading(false)
}) })
}, [loading]) }, [loading, handle])
return ( return (
<div> <div>
@@ -190,7 +190,7 @@ export const handleHighlights = [
{option.title} {option.title}
<ul> <ul>
{option.values?.map((optionValue) => ( {option.values?.map((optionValue) => (
<li id={optionValue.id}>{optionValue.value}</li> <li key={optionValue.id}>{optionValue.value}</li>
))} ))}
</ul> </ul>
</li> </li>
@@ -198,7 +198,7 @@ export const handleHighlights = [
</ul> </ul>
)} )}
{product.images?.map((image) => ( {product.images?.map((image) => (
<img src={image.url} key={image.id} /> <img src={image.url} alt={product.title} key={image.id} />
))} ))}
</> </>
)} )}
@@ -220,7 +220,7 @@ export const handleFetchHighlights = [
}) })
.then(({ products }) => { .then(({ products }) => {
if (!products.length) { if (!products.length) {
// product with the specified handle doesn't exist // Product not found with the specified handle
return return
} }
// use the product... // use the product...
@@ -233,11 +233,87 @@ export const handleFetchHighlights = [
--- ---
## Retrieve Translated Product
<Prerequisites
items={[
{
text: "Translation Module Configured",
link: "/commerce-modules/translation#configure-translation-module",
}
]}
/>
By default, Medusa returns the product's original content (such as title and description).
If you support [localization](../../localization/page.mdx) in your storefront, you can set the locale to retrieve product information based on the customer's preferred language.
You can set the locale using one of the following methods:
- Use the JS SDK's `setLocale` method. The JS SDK will automatically include the locale in subsequent requests.
- Pass the `locale` query parameter to the [List Products API route](!api!/store#products_getproducts).
- Set the `x-medusa-locale` header in the API request to the [List Products API route](!api!/store#products_getproducts).
For example:
<CodeTabs group="localized-products">
<CodeTab label="Using JS SDK" value="js-sdk">
```ts
sdk.setLocale("fr-FR")
sdk.store.product.retrieve(id)
.then(({ product }) => {
// TODO use the product...
console.log(product)
})
```
</CodeTab>
<CodeTab label="Using Query Parameter" value="query-param">
```bash
curl "http://localhost:9000/store/products/prod_123?locale=fr-FR" \
-H 'x-publishable-api-key: {your_publishable_api_key}'
```
</CodeTab>
<CodeTab label="Using Header" value="header">
```bash
curl "http://localhost:9000/store/products/prod_123" \
-H 'x-publishable-api-key: {your_publishable_api_key}' \
-H "x-medusa-locale: fr-FR"
```
</CodeTab>
</CodeTabs>
The returned product will have the same structure as described in the [products schema](!api!/store#products_product_schema), but fields such as `title` and `description` will be in the specified locale:
```json
{
"id": "prod_123",
"title": "Chemise Exemple",
"description": "Ceci est une description en français.",
// other product fields...
}
```
If translations aren't available for the selected locale, or no locale is selected, the product's original content is returned.
### Retrieve in Server-Side Environments
For server-side environments (such as server components or server actions in Next.js), you can set the locale using cookies to persist the selected locale across requests.
Learn more in the [Storefront Localization](../../localization/page.mdx#set-locale-in-server-environments) guide.
---
## Features in Product Details Page ## Features in Product Details Page
In a product's details page, you want to allow the customer to choose a variant, see its price, and add it to the cart. On a product details page, you typically want to allow customers to choose a variant, see its price, and add it to the cart.
The following guides will help you add these features into your storefront: The following guides will help you add these features to your storefront:
- [Select a variant](../variants/page.mdx) - [Select a variant](../variants/page.mdx)
- [Show variant price](../price/page.mdx) - [Show variant price](../price/page.mdx)
+94 -19
View File
@@ -7,7 +7,7 @@ export const generatedEditDates = {
"app/commerce-modules/auth/page.mdx": "2025-04-17T08:48:17.286Z", "app/commerce-modules/auth/page.mdx": "2025-04-17T08:48:17.286Z",
"app/commerce-modules/cart/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/cart/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00",
"app/commerce-modules/cart/_events/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/cart/_events/page.mdx": "2024-07-03T19:27:13+03:00",
"app/commerce-modules/cart/concepts/page.mdx": "2025-08-21T14:50:37.130Z", "app/commerce-modules/cart/concepts/page.mdx": "2025-12-10T13:46:32.697Z",
"app/commerce-modules/cart/promotions/page.mdx": "2024-10-08T07:54:31.120Z", "app/commerce-modules/cart/promotions/page.mdx": "2024-10-08T07:54:31.120Z",
"app/commerce-modules/cart/tax-lines/page.mdx": "2024-10-08T07:57:19.168Z", "app/commerce-modules/cart/tax-lines/page.mdx": "2024-10-08T07:57:19.168Z",
"app/commerce-modules/cart/page.mdx": "2025-04-17T08:48:27.822Z", "app/commerce-modules/cart/page.mdx": "2025-04-17T08:48:27.822Z",
@@ -34,7 +34,7 @@ export const generatedEditDates = {
"app/commerce-modules/order/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/order/_events/_events-table/page.mdx": "2024-07-03T19:27:13+03:00",
"app/commerce-modules/order/_events/page.mdx": "2024-07-03T19:27:13+03:00", "app/commerce-modules/order/_events/page.mdx": "2024-07-03T19:27:13+03:00",
"app/commerce-modules/order/claim/page.mdx": "2025-09-16T16:07:25.033Z", "app/commerce-modules/order/claim/page.mdx": "2025-09-16T16:07:25.033Z",
"app/commerce-modules/order/concepts/page.mdx": "2025-08-21T15:05:58.124Z", "app/commerce-modules/order/concepts/page.mdx": "2025-12-10T15:07:09.015Z",
"app/commerce-modules/order/exchange/page.mdx": "2025-02-26T11:23:29.845Z", "app/commerce-modules/order/exchange/page.mdx": "2025-02-26T11:23:29.845Z",
"app/commerce-modules/order/order-versioning/page.mdx": "2025-08-21T15:31:58.563Z", "app/commerce-modules/order/order-versioning/page.mdx": "2025-08-21T15:31:58.563Z",
"app/commerce-modules/order/promotion-adjustments/page.mdx": "2024-10-09T10:19:19.333Z", "app/commerce-modules/order/promotion-adjustments/page.mdx": "2024-10-09T10:19:19.333Z",
@@ -98,7 +98,7 @@ export const generatedEditDates = {
"app/commerce-modules/user/module-options/page.mdx": "2025-10-31T10:08:14.831Z", "app/commerce-modules/user/module-options/page.mdx": "2025-10-31T10:08:14.831Z",
"app/commerce-modules/user/user-creation-flows/page.mdx": "2025-02-26T11:35:54.685Z", "app/commerce-modules/user/user-creation-flows/page.mdx": "2025-02-26T11:35:54.685Z",
"app/commerce-modules/user/page.mdx": "2025-04-17T08:48:17.980Z", "app/commerce-modules/user/page.mdx": "2025-04-17T08:48:17.980Z",
"app/commerce-modules/page.mdx": "2025-12-09T10:58:53.037Z", "app/commerce-modules/page.mdx": "2025-12-10T15:30:40.173Z",
"app/create-medusa-app/page.mdx": "2025-07-14T08:51:06.654Z", "app/create-medusa-app/page.mdx": "2025-07-14T08:51:06.654Z",
"app/deployment/admin/vercel/page.mdx": "2024-10-16T08:10:29.377Z", "app/deployment/admin/vercel/page.mdx": "2024-10-16T08:10:29.377Z",
"app/deployment/storefront/vercel/page.mdx": "2025-05-20T07:51:40.712Z", "app/deployment/storefront/vercel/page.mdx": "2025-05-20T07:51:40.712Z",
@@ -115,7 +115,7 @@ export const generatedEditDates = {
"app/recipes/ecommerce/page.mdx": "2025-06-24T08:50:10.116Z", "app/recipes/ecommerce/page.mdx": "2025-06-24T08:50:10.116Z",
"app/recipes/marketplace/examples/vendors/page.mdx": "2025-11-28T10:09:41.993Z", "app/recipes/marketplace/examples/vendors/page.mdx": "2025-11-28T10:09:41.993Z",
"app/recipes/marketplace/page.mdx": "2025-05-20T07:51:40.721Z", "app/recipes/marketplace/page.mdx": "2025-05-20T07:51:40.721Z",
"app/recipes/multi-region-store/page.mdx": "2025-05-20T07:51:40.721Z", "app/recipes/multi-region-store/page.mdx": "2025-12-16T14:00:27.869Z",
"app/recipes/omnichannel/page.mdx": "2025-05-20T07:51:40.722Z", "app/recipes/omnichannel/page.mdx": "2025-05-20T07:51:40.722Z",
"app/recipes/oms/page.mdx": "2025-05-20T07:51:40.722Z", "app/recipes/oms/page.mdx": "2025-05-20T07:51:40.722Z",
"app/recipes/personalized-products/page.mdx": "2025-07-22T06:52:29.419Z", "app/recipes/personalized-products/page.mdx": "2025-07-22T06:52:29.419Z",
@@ -134,13 +134,13 @@ export const generatedEditDates = {
"app/service-factory-reference/tips/filtering/page.mdx": "2025-08-15T12:06:28.709Z", "app/service-factory-reference/tips/filtering/page.mdx": "2025-08-15T12:06:28.709Z",
"app/service-factory-reference/page.mdx": "2025-09-01T15:57:34.193Z", "app/service-factory-reference/page.mdx": "2025-09-01T15:57:34.193Z",
"app/storefront-development/cart/context/page.mdx": "2025-03-27T14:47:14.258Z", "app/storefront-development/cart/context/page.mdx": "2025-03-27T14:47:14.258Z",
"app/storefront-development/cart/create/page.mdx": "2025-03-27T14:46:51.473Z", "app/storefront-development/cart/create/page.mdx": "2025-12-16T07:17:17.903Z",
"app/storefront-development/cart/manage-items/page.mdx": "2025-03-26T15:54:31.446Z", "app/storefront-development/cart/manage-items/page.mdx": "2025-03-26T15:54:31.446Z",
"app/storefront-development/cart/retrieve/page.mdx": "2025-03-27T14:46:51.473Z", "app/storefront-development/cart/retrieve/page.mdx": "2025-03-27T14:46:51.473Z",
"app/storefront-development/cart/update/page.mdx": "2025-03-27T07:11:57.749Z", "app/storefront-development/cart/update/page.mdx": "2025-12-16T07:16:57.881Z",
"app/storefront-development/cart/page.mdx": "2024-06-11T11:56:37+03:00", "app/storefront-development/cart/page.mdx": "2024-06-11T11:56:37+03:00",
"app/storefront-development/checkout/address/page.mdx": "2025-03-27T14:47:14.265Z", "app/storefront-development/checkout/address/page.mdx": "2025-03-27T14:47:14.265Z",
"app/storefront-development/checkout/complete-cart/page.mdx": "2025-03-27T14:47:14.277Z", "app/storefront-development/checkout/complete-cart/page.mdx": "2025-12-16T07:18:04.397Z",
"app/storefront-development/checkout/email/page.mdx": "2025-03-27T14:47:14.283Z", "app/storefront-development/checkout/email/page.mdx": "2025-03-27T14:47:14.283Z",
"app/storefront-development/checkout/payment/stripe/page.mdx": "2025-07-16T10:18:44.916Z", "app/storefront-development/checkout/payment/stripe/page.mdx": "2025-07-16T10:18:44.916Z",
"app/storefront-development/checkout/payment/page.mdx": "2025-07-16T10:18:47.607Z", "app/storefront-development/checkout/payment/page.mdx": "2025-07-16T10:18:47.607Z",
@@ -163,12 +163,12 @@ export const generatedEditDates = {
"app/storefront-development/products/collections/products/page.mdx": "2025-03-27T14:46:51.466Z", "app/storefront-development/products/collections/products/page.mdx": "2025-03-27T14:46:51.466Z",
"app/storefront-development/products/collections/retrieve/page.mdx": "2025-03-27T14:46:51.458Z", "app/storefront-development/products/collections/retrieve/page.mdx": "2025-03-27T14:46:51.458Z",
"app/storefront-development/products/collections/page.mdx": "2024-06-11T19:55:56+02:00", "app/storefront-development/products/collections/page.mdx": "2024-06-11T19:55:56+02:00",
"app/storefront-development/products/list/page.mdx": "2025-12-09T13:32:29.583Z", "app/storefront-development/products/list/page.mdx": "2025-12-16T07:20:12.269Z",
"app/storefront-development/products/price/examples/sale-price/page.mdx": "2025-03-27T14:47:14.308Z", "app/storefront-development/products/price/examples/sale-price/page.mdx": "2025-03-27T14:47:14.308Z",
"app/storefront-development/products/price/examples/show-price/page.mdx": "2025-03-27T14:47:14.292Z", "app/storefront-development/products/price/examples/show-price/page.mdx": "2025-03-27T14:47:14.292Z",
"app/storefront-development/products/price/examples/tax-price/page.mdx": "2025-03-27T14:47:14.292Z", "app/storefront-development/products/price/examples/tax-price/page.mdx": "2025-03-27T14:47:14.292Z",
"app/storefront-development/products/price/page.mdx": "2025-04-24T09:25:43.094Z", "app/storefront-development/products/price/page.mdx": "2025-04-24T09:25:43.094Z",
"app/storefront-development/products/retrieve/page.mdx": "2025-03-27T14:46:51.433Z", "app/storefront-development/products/retrieve/page.mdx": "2025-12-16T07:20:42.487Z",
"app/storefront-development/products/variants/page.mdx": "2025-03-27T14:46:51.576Z", "app/storefront-development/products/variants/page.mdx": "2025-03-27T14:46:51.576Z",
"app/storefront-development/products/page.mdx": "2024-06-11T19:55:56+02:00", "app/storefront-development/products/page.mdx": "2024-06-11T19:55:56+02:00",
"app/storefront-development/regions/context/page.mdx": "2025-03-27T14:47:14.286Z", "app/storefront-development/regions/context/page.mdx": "2025-03-27T14:47:14.286Z",
@@ -2106,7 +2106,7 @@ export const generatedEditDates = {
"app/commerce-modules/inventory/links-to-other-modules/page.mdx": "2025-04-17T15:49:56.087Z", "app/commerce-modules/inventory/links-to-other-modules/page.mdx": "2025-04-17T15:49:56.087Z",
"app/commerce-modules/pricing/links-to-other-modules/page.mdx": "2025-04-17T15:55:36.098Z", "app/commerce-modules/pricing/links-to-other-modules/page.mdx": "2025-04-17T15:55:36.098Z",
"app/commerce-modules/product/extend/page.mdx": "2024-12-11T09:07:25.252Z", "app/commerce-modules/product/extend/page.mdx": "2024-12-11T09:07:25.252Z",
"app/commerce-modules/product/links-to-other-modules/page.mdx": "2025-04-17T15:58:21.559Z", "app/commerce-modules/product/links-to-other-modules/page.mdx": "2025-12-10T12:23:46.406Z",
"app/commerce-modules/promotion/extend/page.mdx": "2024-12-11T09:07:24.137Z", "app/commerce-modules/promotion/extend/page.mdx": "2024-12-11T09:07:24.137Z",
"app/commerce-modules/promotion/links-to-other-modules/page.mdx": "2025-04-17T15:59:11.667Z", "app/commerce-modules/promotion/links-to-other-modules/page.mdx": "2025-04-17T15:59:11.667Z",
"app/commerce-modules/order/edit/page.mdx": "2025-02-26T11:24:28.852Z", "app/commerce-modules/order/edit/page.mdx": "2025-02-26T11:24:28.852Z",
@@ -2163,10 +2163,10 @@ export const generatedEditDates = {
"app/commerce-modules/region/links-to-other-modules/page.mdx": "2025-04-17T15:59:34.123Z", "app/commerce-modules/region/links-to-other-modules/page.mdx": "2025-04-17T15:59:34.123Z",
"app/commerce-modules/sales-channel/links-to-other-modules/page.mdx": "2025-04-17T16:00:09.483Z", "app/commerce-modules/sales-channel/links-to-other-modules/page.mdx": "2025-04-17T16:00:09.483Z",
"app/commerce-modules/stock-location/links-to-other-modules/page.mdx": "2025-04-17T16:02:51.467Z", "app/commerce-modules/stock-location/links-to-other-modules/page.mdx": "2025-04-17T16:02:51.467Z",
"app/commerce-modules/store/links-to-other-modules/page.mdx": "2025-04-17T16:03:16.419Z", "app/commerce-modules/store/links-to-other-modules/page.mdx": "2025-12-16T06:36:58.256Z",
"app/examples/page.mdx": "2025-10-28T16:02:32.447Z", "app/examples/page.mdx": "2025-10-28T16:02:32.447Z",
"app/medusa-cli/commands/build/page.mdx": "2025-09-01T15:30:05.995Z", "app/medusa-cli/commands/build/page.mdx": "2025-09-01T15:30:05.995Z",
"app/js-sdk/page.mdx": "2025-08-01T14:17:07.509Z", "app/js-sdk/page.mdx": "2025-12-16T07:15:37.754Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.apiKey/page.mdx": "2025-10-31T09:41:41.216Z", "references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.apiKey/page.mdx": "2025-10-31T09:41:41.216Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.campaign/page.mdx": "2025-10-31T09:41:41.295Z", "references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.campaign/page.mdx": "2025-10-31T09:41:41.295Z",
"references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.claim/page.mdx": "2025-12-01T18:33:09.959Z", "references/js_sdk/admin/Admin/properties/js_sdk.admin.Admin.claim/page.mdx": "2025-12-01T18:33:09.959Z",
@@ -3192,7 +3192,7 @@ export const generatedEditDates = {
"references/modules/sales_channel/page.mdx": "2024-11-25T17:49:58.852Z", "references/modules/sales_channel/page.mdx": "2024-11-25T17:49:58.852Z",
"references/modules/stock_location_next/page.mdx": "2025-01-07T12:54:26.110Z", "references/modules/stock_location_next/page.mdx": "2025-01-07T12:54:26.110Z",
"references/modules/store/page.mdx": "2024-12-10T14:55:13.386Z", "references/modules/store/page.mdx": "2024-12-10T14:55:13.386Z",
"references/modules/store_models/page.mdx": "2024-12-23T08:25:10.210Z", "references/modules/store_models/page.mdx": "2025-12-10T15:54:22.049Z",
"references/modules/tax_models/page.mdx": "2024-12-23T12:30:34.246Z", "references/modules/tax_models/page.mdx": "2024-12-23T12:30:34.246Z",
"references/modules/tax_provider/page.mdx": "2024-11-25T17:49:59.280Z", "references/modules/tax_provider/page.mdx": "2024-11-25T17:49:59.280Z",
"references/modules/user/page.mdx": "2024-11-25T17:49:59.504Z", "references/modules/user/page.mdx": "2024-11-25T17:49:59.504Z",
@@ -5543,8 +5543,8 @@ export const generatedEditDates = {
"references/store/types/store.Query/page.mdx": "2024-12-10T14:55:13.390Z", "references/store/types/store.Query/page.mdx": "2024-12-10T14:55:13.390Z",
"references/store/types/store.ReadonlyPrimary/page.mdx": "2024-12-10T14:55:13.392Z", "references/store/types/store.ReadonlyPrimary/page.mdx": "2024-12-10T14:55:13.392Z",
"references/store/types/store.Scalar/page.mdx": "2024-12-10T14:55:13.391Z", "references/store/types/store.Scalar/page.mdx": "2024-12-10T14:55:13.391Z",
"references/store_models/variables/store_models.Store/page.mdx": "2025-12-03T08:42:00.740Z", "references/store_models/variables/store_models.Store/page.mdx": "2025-12-10T15:54:22.055Z",
"references/store_models/variables/store_models.StoreCurrency/page.mdx": "2025-12-03T08:42:00.736Z", "references/store_models/variables/store_models.StoreCurrency/page.mdx": "2025-12-10T15:54:22.051Z",
"references/types/HttpTypes/interfaces/types.HttpTypes.StoreCalculatedPrice/page.mdx": "2025-03-04T13:33:51.211Z", "references/types/HttpTypes/interfaces/types.HttpTypes.StoreCalculatedPrice/page.mdx": "2025-03-04T13:33:51.211Z",
"references/types/HttpTypes/interfaces/types.HttpTypes.StorePrice/page.mdx": "2024-12-10T14:54:56.154Z", "references/types/HttpTypes/interfaces/types.HttpTypes.StorePrice/page.mdx": "2024-12-10T14:54:56.154Z",
"references/types/HttpTypes/interfaces/types.HttpTypes.StorePriceRule/page.mdx": "2024-12-10T14:54:56.155Z", "references/types/HttpTypes/interfaces/types.HttpTypes.StorePriceRule/page.mdx": "2024-12-10T14:54:56.155Z",
@@ -6027,7 +6027,7 @@ export const generatedEditDates = {
"references/notification_service/interfaces/notification_service.INotificationModuleService/page.mdx": "2025-12-01T18:33:03.621Z", "references/notification_service/interfaces/notification_service.INotificationModuleService/page.mdx": "2025-12-01T18:33:03.621Z",
"app/nextjs-starter/guides/revalidate-cache/page.mdx": "2025-05-01T15:33:42.490Z", "app/nextjs-starter/guides/revalidate-cache/page.mdx": "2025-05-01T15:33:42.490Z",
"app/storefront-development/cart/totals/page.mdx": "2025-09-15T15:13:56.268Z", "app/storefront-development/cart/totals/page.mdx": "2025-09-15T15:13:56.268Z",
"app/storefront-development/checkout/order-confirmation/page.mdx": "2025-08-14T15:58:36.610Z", "app/storefront-development/checkout/order-confirmation/page.mdx": "2025-12-16T07:17:57.133Z",
"app/how-to-tutorials/tutorials/product-reviews/page.mdx": "2025-10-28T16:02:34.678Z", "app/how-to-tutorials/tutorials/product-reviews/page.mdx": "2025-10-28T16:02:34.678Z",
"app/troubleshooting/data-models/default-fields/page.mdx": "2025-03-21T06:59:06.775Z", "app/troubleshooting/data-models/default-fields/page.mdx": "2025-03-21T06:59:06.775Z",
"app/troubleshooting/medusa-admin/blocked-request/page.mdx": "2025-03-21T06:53:34.854Z", "app/troubleshooting/medusa-admin/blocked-request/page.mdx": "2025-03-21T06:53:34.854Z",
@@ -6188,7 +6188,7 @@ export const generatedEditDates = {
"references/core_flows/interfaces/core_flows.ValidateDraftOrderStepInput/page.mdx": "2025-12-01T18:32:55.242Z", "references/core_flows/interfaces/core_flows.ValidateDraftOrderStepInput/page.mdx": "2025-12-01T18:32:55.242Z",
"app/commerce-modules/product/guides/variant-inventory/page.mdx": "2025-04-25T14:22:42.329Z", "app/commerce-modules/product/guides/variant-inventory/page.mdx": "2025-04-25T14:22:42.329Z",
"app/troubleshooting/validation-error/page.mdx": "2025-04-25T14:14:57.568Z", "app/troubleshooting/validation-error/page.mdx": "2025-04-25T14:14:57.568Z",
"app/integrations/guides/contentful/page.mdx": "2025-10-31T16:38:10.351Z", "app/integrations/guides/contentful/page.mdx": "2025-12-16T13:57:47.745Z",
"references/modules/events/page.mdx": "2025-11-26T13:20:45.710Z", "references/modules/events/page.mdx": "2025-11-26T13:20:45.710Z",
"references/module_events/module_events.Auth/page.mdx": "2025-05-20T07:51:40.956Z", "references/module_events/module_events.Auth/page.mdx": "2025-05-20T07:51:40.956Z",
"references/module_events/module_events.Cart/page.mdx": "2025-05-20T07:51:40.956Z", "references/module_events/module_events.Cart/page.mdx": "2025-05-20T07:51:40.956Z",
@@ -6558,7 +6558,7 @@ export const generatedEditDates = {
"app/how-to-tutorials/tutorials/product-builder/page.mdx": "2025-11-28T11:00:31.676Z", "app/how-to-tutorials/tutorials/product-builder/page.mdx": "2025-11-28T11:00:31.676Z",
"app/integrations/guides/payload/page.mdx": "2025-10-22T15:05:39.648Z", "app/integrations/guides/payload/page.mdx": "2025-10-22T15:05:39.648Z",
"references/js_sdk/admin/Client/methods/js_sdk.admin.Client.getToken/page.mdx": "2025-08-14T12:59:55.678Z", "references/js_sdk/admin/Client/methods/js_sdk.admin.Client.getToken/page.mdx": "2025-08-14T12:59:55.678Z",
"app/commerce-modules/order/draft-orders/page.mdx": "2025-08-26T09:21:49.780Z", "app/commerce-modules/order/draft-orders/page.mdx": "2025-12-10T15:06:37.701Z",
"app/troubleshooting/scheduled-job-not-running/page.mdx": "2025-12-04T14:15:34.338Z", "app/troubleshooting/scheduled-job-not-running/page.mdx": "2025-12-04T14:15:34.338Z",
"app/troubleshooting/pnpm/page.mdx": "2025-08-29T12:21:24.692Z", "app/troubleshooting/pnpm/page.mdx": "2025-08-29T12:21:24.692Z",
"app/how-to-tutorials/tutorials/product-feed/page.mdx": "2025-10-02T10:24:52.283Z", "app/how-to-tutorials/tutorials/product-feed/page.mdx": "2025-10-02T10:24:52.283Z",
@@ -6739,5 +6739,80 @@ export const generatedEditDates = {
"references/types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateOrderChange/page.mdx": "2025-12-01T18:33:00.960Z", "references/types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateOrderChange/page.mdx": "2025-12-01T18:33:00.960Z",
"references/promotion/types/promotion.ComputeActions/page.mdx": "2025-12-01T18:33:06.048Z", "references/promotion/types/promotion.ComputeActions/page.mdx": "2025-12-01T18:33:06.048Z",
"references/utils/PromotionUtils/enums/utils.PromotionUtils.ComputedActions/page.mdx": "2025-12-01T18:33:07.491Z", "references/utils/PromotionUtils/enums/utils.PromotionUtils.ComputedActions/page.mdx": "2025-12-01T18:33:07.491Z",
"app/integrations/guides/strapi/page.mdx": "2025-11-17T10:34:00.881Z" "app/integrations/guides/strapi/page.mdx": "2025-11-17T10:34:00.881Z",
"app/commerce-modules/store/locales/page.mdx": "2025-12-16T07:13:12.389Z",
"app/commerce-modules/translation/concepts/page.mdx": "2025-12-16T07:13:50.326Z",
"app/commerce-modules/translation/link-to-other-modules/page.mdx": "2025-12-10T13:23:44.262Z",
"app/commerce-modules/translation/page.mdx": "2025-12-10T15:31:44.251Z",
"app/commerce-modules/translation/storefront/page.mdx": "2025-12-16T07:15:02.192Z",
"app/storefront-development/localization/page.mdx": "2025-12-16T07:18:51.976Z",
"app/commerce-modules/translation/js-sdk/page.mdx": "2025-12-10T15:24:57.155Z",
"app/commerce-modules/translation/workflows/page.mdx": "2025-12-10T15:24:45.190Z",
"references/modules/translation_models/page.mdx": "2025-12-10T15:54:22.071Z",
"references/translation/IMessageAggregator/methods/translation.IMessageAggregator.clearMessages/page.mdx": "2025-12-10T15:54:18.897Z",
"references/translation/IMessageAggregator/methods/translation.IMessageAggregator.getMessages/page.mdx": "2025-12-10T15:54:18.896Z",
"references/translation/IMessageAggregator/methods/translation.IMessageAggregator.save/page.mdx": "2025-12-10T15:54:18.895Z",
"references/translation/IMessageAggregator/methods/translation.IMessageAggregator.saveRawMessageData/page.mdx": "2025-12-10T15:54:18.898Z",
"references/translation/IModuleService/methods/translation.IModuleService.__joinerConfig/page.mdx": "2025-12-10T15:54:18.893Z",
"references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.createLocales/page.mdx": "2025-12-10T15:54:18.919Z",
"references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.createTranslations/page.mdx": "2025-12-10T15:54:18.934Z",
"references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.deleteLocales/page.mdx": "2025-12-10T15:54:18.923Z",
"references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.deleteTranslations/page.mdx": "2025-12-10T15:54:18.939Z",
"references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listAndCountLocales/page.mdx": "2025-12-10T15:54:18.917Z",
"references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listAndCountTranslations/page.mdx": "2025-12-10T15:54:18.932Z",
"references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listLocales/page.mdx": "2025-12-10T15:54:18.915Z",
"references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listTranslations/page.mdx": "2025-12-10T15:54:18.929Z",
"references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.restoreLocales/page.mdx": "2025-12-10T15:54:18.925Z",
"references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.restoreTranslations/page.mdx": "2025-12-10T15:54:18.941Z",
"references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.retrieveLocale/page.mdx": "2025-12-10T15:54:18.913Z",
"references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.retrieveTranslation/page.mdx": "2025-12-10T15:54:18.927Z",
"references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.softDeleteLocales/page.mdx": "2025-12-10T15:54:18.924Z",
"references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.softDeleteTranslations/page.mdx": "2025-12-10T15:54:18.940Z",
"references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.updateLocales/page.mdx": "2025-12-10T15:54:18.922Z",
"references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.updateTranslations/page.mdx": "2025-12-10T15:54:18.938Z",
"references/translation/interfaces/translation.BaseFilterable/page.mdx": "2025-12-10T15:54:18.871Z",
"references/translation/interfaces/translation.Context/page.mdx": "2025-12-10T15:54:18.899Z",
"references/translation/interfaces/translation.CreateLocaleDTO/page.mdx": "2025-12-10T15:54:18.908Z",
"references/translation/interfaces/translation.CreateTranslationDTO/page.mdx": "2025-12-10T15:54:18.910Z",
"references/translation/interfaces/translation.FilterableLocaleProps/page.mdx": "2025-12-10T15:54:18.904Z",
"references/translation/interfaces/translation.FilterableTranslationProps/page.mdx": "2025-12-10T15:54:18.907Z",
"references/translation/interfaces/translation.FindConfig/page.mdx": "2025-12-10T15:54:18.870Z",
"references/translation/interfaces/translation.IMessageAggregator/page.mdx": "2025-12-10T15:54:18.894Z",
"references/translation/interfaces/translation.IModuleService/page.mdx": "2025-12-10T15:54:18.891Z",
"references/translation/interfaces/translation.ITranslationModuleService/page.mdx": "2025-12-10T15:54:18.911Z",
"references/translation/interfaces/translation.JoinerServiceConfig/page.mdx": "2025-12-10T15:54:18.887Z",
"references/translation/interfaces/translation.JoinerServiceConfigAlias/page.mdx": "2025-12-10T15:54:18.886Z",
"references/translation/interfaces/translation.LocaleDTO/page.mdx": "2025-12-10T15:54:18.900Z",
"references/translation/interfaces/translation.MessageAggregatorFormat/page.mdx": "2025-12-10T15:54:18.894Z",
"references/translation/interfaces/translation.RestoreReturn/page.mdx": "2025-12-10T15:54:18.873Z",
"references/translation/interfaces/translation.SoftDeleteReturn/page.mdx": "2025-12-10T15:54:18.872Z",
"references/translation/interfaces/translation.TranslationDTO/page.mdx": "2025-12-10T15:54:18.901Z",
"references/translation/interfaces/translation.UpdateLocaleDTO/page.mdx": "2025-12-10T15:54:18.908Z",
"references/translation/interfaces/translation.UpdateTranslationDTO/page.mdx": "2025-12-10T15:54:18.911Z",
"references/translation/types/translation.Constructor/page.mdx": "2025-12-10T15:54:18.888Z",
"references/translation/types/translation.Event/page.mdx": "2025-12-10T15:54:18.882Z",
"references/translation/types/translation.EventMetadata/page.mdx": "2025-12-10T15:54:18.881Z",
"references/translation/types/translation.ExpandScalar/page.mdx": "2025-12-10T15:54:18.874Z",
"references/translation/types/translation.FilterQuery/page.mdx": "2025-12-10T15:54:18.881Z",
"references/translation/types/translation.FilterQueryProperties/page.mdx": "2025-12-10T15:54:18.880Z",
"references/translation/types/translation.FilterValue/page.mdx": "2025-12-10T15:54:18.879Z",
"references/translation/types/translation.FilterValue2/page.mdx": "2025-12-10T15:54:18.878Z",
"references/translation/types/translation.FindConfigOrder/page.mdx": "2025-12-10T15:54:18.869Z",
"references/translation/types/translation.JoinerRelationship/page.mdx": "2025-12-10T15:54:18.885Z",
"references/translation/types/translation.LinkModulesExtraFields/page.mdx": "2025-12-10T15:54:18.888Z",
"references/translation/types/translation.Message/page.mdx": "2025-12-10T15:54:18.883Z",
"references/translation/types/translation.ModuleJoinerConfig/page.mdx": "2025-12-10T15:54:18.889Z",
"references/translation/types/translation.ModuleJoinerRelationship/page.mdx": "2025-12-10T15:54:18.890Z",
"references/translation/types/translation.OperatorMap/page.mdx": "2025-12-10T15:54:18.877Z",
"references/translation/types/translation.PrevLimit/page.mdx": "2025-12-10T15:54:18.879Z",
"references/translation/types/translation.Primary/page.mdx": "2025-12-10T15:54:18.876Z",
"references/translation/types/translation.Query/page.mdx": "2025-12-10T15:54:18.873Z",
"references/translation/types/translation.RawMessageFormat/page.mdx": "2025-12-10T15:54:18.884Z",
"references/translation/types/translation.ReadonlyPrimary/page.mdx": "2025-12-10T15:54:18.875Z",
"references/translation/types/translation.Scalar/page.mdx": "2025-12-10T15:54:18.875Z",
"references/translation_models/variables/translation_models.Locale/page.mdx": "2025-12-10T15:54:22.072Z",
"references/translation_models/variables/translation_models.Translation/page.mdx": "2025-12-10T15:54:22.073Z",
"app/commerce-modules/translation/links-to-other-modules/page.mdx": "2025-12-16T06:36:50.848Z",
"references/modules/translation/page.mdx": "2025-12-10T15:54:18.868Z",
"references/store_models/variables/store_models.StoreLocale/page.mdx": "2025-12-10T15:54:22.053Z"
} }
+296
View File
@@ -611,6 +611,10 @@ export const filesMap = [
"filePath": "/www/apps/resources/app/commerce-modules/store/links-to-other-modules/page.mdx", "filePath": "/www/apps/resources/app/commerce-modules/store/links-to-other-modules/page.mdx",
"pathname": "/commerce-modules/store/links-to-other-modules" "pathname": "/commerce-modules/store/links-to-other-modules"
}, },
{
"filePath": "/www/apps/resources/app/commerce-modules/store/locales/page.mdx",
"pathname": "/commerce-modules/store/locales"
},
{ {
"filePath": "/www/apps/resources/app/commerce-modules/store/page.mdx", "filePath": "/www/apps/resources/app/commerce-modules/store/page.mdx",
"pathname": "/commerce-modules/store" "pathname": "/commerce-modules/store"
@@ -655,6 +659,30 @@ export const filesMap = [
"filePath": "/www/apps/resources/app/commerce-modules/tax/workflows/page.mdx", "filePath": "/www/apps/resources/app/commerce-modules/tax/workflows/page.mdx",
"pathname": "/commerce-modules/tax/workflows" "pathname": "/commerce-modules/tax/workflows"
}, },
{
"filePath": "/www/apps/resources/app/commerce-modules/translation/concepts/page.mdx",
"pathname": "/commerce-modules/translation/concepts"
},
{
"filePath": "/www/apps/resources/app/commerce-modules/translation/js-sdk/page.mdx",
"pathname": "/commerce-modules/translation/js-sdk"
},
{
"filePath": "/www/apps/resources/app/commerce-modules/translation/links-to-other-modules/page.mdx",
"pathname": "/commerce-modules/translation/links-to-other-modules"
},
{
"filePath": "/www/apps/resources/app/commerce-modules/translation/page.mdx",
"pathname": "/commerce-modules/translation"
},
{
"filePath": "/www/apps/resources/app/commerce-modules/translation/storefront/page.mdx",
"pathname": "/commerce-modules/translation/storefront"
},
{
"filePath": "/www/apps/resources/app/commerce-modules/translation/workflows/page.mdx",
"pathname": "/commerce-modules/translation/workflows"
},
{ {
"filePath": "/www/apps/resources/app/commerce-modules/user/admin-widget-zones/page.mdx", "filePath": "/www/apps/resources/app/commerce-modules/user/admin-widget-zones/page.mdx",
"pathname": "/commerce-modules/user/admin-widget-zones" "pathname": "/commerce-modules/user/admin-widget-zones"
@@ -1343,6 +1371,10 @@ export const filesMap = [
"filePath": "/www/apps/resources/app/storefront-development/guides/react-native-expo/page.mdx", "filePath": "/www/apps/resources/app/storefront-development/guides/react-native-expo/page.mdx",
"pathname": "/storefront-development/guides/react-native-expo" "pathname": "/storefront-development/guides/react-native-expo"
}, },
{
"filePath": "/www/apps/resources/app/storefront-development/localization/page.mdx",
"pathname": "/storefront-development/localization"
},
{ {
"filePath": "/www/apps/resources/app/storefront-development/page.mdx", "filePath": "/www/apps/resources/app/storefront-development/page.mdx",
"pathname": "/storefront-development" "pathname": "/storefront-development"
@@ -14591,6 +14623,14 @@ export const filesMap = [
"filePath": "/www/apps/resources/references/modules/tax_provider/page.mdx", "filePath": "/www/apps/resources/references/modules/tax_provider/page.mdx",
"pathname": "/references/modules/tax_provider" "pathname": "/references/modules/tax_provider"
}, },
{
"filePath": "/www/apps/resources/references/modules/translation/page.mdx",
"pathname": "/references/modules/translation"
},
{
"filePath": "/www/apps/resources/references/modules/translation_models/page.mdx",
"pathname": "/references/modules/translation_models"
},
{ {
"filePath": "/www/apps/resources/references/modules/types/page.mdx", "filePath": "/www/apps/resources/references/modules/types/page.mdx",
"pathname": "/references/modules/types" "pathname": "/references/modules/types"
@@ -19079,6 +19119,10 @@ export const filesMap = [
"filePath": "/www/apps/resources/references/store_models/variables/store_models.StoreCurrency/page.mdx", "filePath": "/www/apps/resources/references/store_models/variables/store_models.StoreCurrency/page.mdx",
"pathname": "/references/store_models/variables/store_models.StoreCurrency" "pathname": "/references/store_models/variables/store_models.StoreCurrency"
}, },
{
"filePath": "/www/apps/resources/references/store_models/variables/store_models.StoreLocale/page.mdx",
"pathname": "/references/store_models/variables/store_models.StoreLocale"
},
{ {
"filePath": "/www/apps/resources/references/tax/IBigNumber/methods/tax.IBigNumber.toJSON/page.mdx", "filePath": "/www/apps/resources/references/tax/IBigNumber/methods/tax.IBigNumber.toJSON/page.mdx",
"pathname": "/references/tax/IBigNumber/methods/tax.IBigNumber.toJSON" "pathname": "/references/tax/IBigNumber/methods/tax.IBigNumber.toJSON"
@@ -19471,6 +19515,258 @@ export const filesMap = [
"filePath": "/www/apps/resources/references/tax_provider/types/tax_provider.ShippingTaxCalculationLine/page.mdx", "filePath": "/www/apps/resources/references/tax_provider/types/tax_provider.ShippingTaxCalculationLine/page.mdx",
"pathname": "/references/tax_provider/types/tax_provider.ShippingTaxCalculationLine" "pathname": "/references/tax_provider/types/tax_provider.ShippingTaxCalculationLine"
}, },
{
"filePath": "/www/apps/resources/references/translation/IMessageAggregator/methods/translation.IMessageAggregator.clearMessages/page.mdx",
"pathname": "/references/translation/IMessageAggregator/methods/translation.IMessageAggregator.clearMessages"
},
{
"filePath": "/www/apps/resources/references/translation/IMessageAggregator/methods/translation.IMessageAggregator.getMessages/page.mdx",
"pathname": "/references/translation/IMessageAggregator/methods/translation.IMessageAggregator.getMessages"
},
{
"filePath": "/www/apps/resources/references/translation/IMessageAggregator/methods/translation.IMessageAggregator.save/page.mdx",
"pathname": "/references/translation/IMessageAggregator/methods/translation.IMessageAggregator.save"
},
{
"filePath": "/www/apps/resources/references/translation/IMessageAggregator/methods/translation.IMessageAggregator.saveRawMessageData/page.mdx",
"pathname": "/references/translation/IMessageAggregator/methods/translation.IMessageAggregator.saveRawMessageData"
},
{
"filePath": "/www/apps/resources/references/translation/IModuleService/methods/translation.IModuleService.__joinerConfig/page.mdx",
"pathname": "/references/translation/IModuleService/methods/translation.IModuleService.__joinerConfig"
},
{
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.createLocales/page.mdx",
"pathname": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.createLocales"
},
{
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.createTranslations/page.mdx",
"pathname": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.createTranslations"
},
{
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.deleteLocales/page.mdx",
"pathname": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.deleteLocales"
},
{
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.deleteTranslations/page.mdx",
"pathname": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.deleteTranslations"
},
{
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listAndCountLocales/page.mdx",
"pathname": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listAndCountLocales"
},
{
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listAndCountTranslations/page.mdx",
"pathname": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listAndCountTranslations"
},
{
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listLocales/page.mdx",
"pathname": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listLocales"
},
{
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listTranslations/page.mdx",
"pathname": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listTranslations"
},
{
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.restoreLocales/page.mdx",
"pathname": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.restoreLocales"
},
{
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.restoreTranslations/page.mdx",
"pathname": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.restoreTranslations"
},
{
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.retrieveLocale/page.mdx",
"pathname": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.retrieveLocale"
},
{
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.retrieveTranslation/page.mdx",
"pathname": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.retrieveTranslation"
},
{
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.softDeleteLocales/page.mdx",
"pathname": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.softDeleteLocales"
},
{
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.softDeleteTranslations/page.mdx",
"pathname": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.softDeleteTranslations"
},
{
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.updateLocales/page.mdx",
"pathname": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.updateLocales"
},
{
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.updateTranslations/page.mdx",
"pathname": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.updateTranslations"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.BaseFilterable/page.mdx",
"pathname": "/references/translation/interfaces/translation.BaseFilterable"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.Context/page.mdx",
"pathname": "/references/translation/interfaces/translation.Context"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.CreateLocaleDTO/page.mdx",
"pathname": "/references/translation/interfaces/translation.CreateLocaleDTO"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.CreateTranslationDTO/page.mdx",
"pathname": "/references/translation/interfaces/translation.CreateTranslationDTO"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.FilterableLocaleProps/page.mdx",
"pathname": "/references/translation/interfaces/translation.FilterableLocaleProps"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.FilterableTranslationProps/page.mdx",
"pathname": "/references/translation/interfaces/translation.FilterableTranslationProps"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.FindConfig/page.mdx",
"pathname": "/references/translation/interfaces/translation.FindConfig"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.IMessageAggregator/page.mdx",
"pathname": "/references/translation/interfaces/translation.IMessageAggregator"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.IModuleService/page.mdx",
"pathname": "/references/translation/interfaces/translation.IModuleService"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.ITranslationModuleService/page.mdx",
"pathname": "/references/translation/interfaces/translation.ITranslationModuleService"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.JoinerServiceConfig/page.mdx",
"pathname": "/references/translation/interfaces/translation.JoinerServiceConfig"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.JoinerServiceConfigAlias/page.mdx",
"pathname": "/references/translation/interfaces/translation.JoinerServiceConfigAlias"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.LocaleDTO/page.mdx",
"pathname": "/references/translation/interfaces/translation.LocaleDTO"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.MessageAggregatorFormat/page.mdx",
"pathname": "/references/translation/interfaces/translation.MessageAggregatorFormat"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.RestoreReturn/page.mdx",
"pathname": "/references/translation/interfaces/translation.RestoreReturn"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.SoftDeleteReturn/page.mdx",
"pathname": "/references/translation/interfaces/translation.SoftDeleteReturn"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.TranslationDTO/page.mdx",
"pathname": "/references/translation/interfaces/translation.TranslationDTO"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.UpdateLocaleDTO/page.mdx",
"pathname": "/references/translation/interfaces/translation.UpdateLocaleDTO"
},
{
"filePath": "/www/apps/resources/references/translation/interfaces/translation.UpdateTranslationDTO/page.mdx",
"pathname": "/references/translation/interfaces/translation.UpdateTranslationDTO"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.Constructor/page.mdx",
"pathname": "/references/translation/types/translation.Constructor"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.Event/page.mdx",
"pathname": "/references/translation/types/translation.Event"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.EventMetadata/page.mdx",
"pathname": "/references/translation/types/translation.EventMetadata"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.ExpandScalar/page.mdx",
"pathname": "/references/translation/types/translation.ExpandScalar"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.FilterQuery/page.mdx",
"pathname": "/references/translation/types/translation.FilterQuery"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.FilterQueryProperties/page.mdx",
"pathname": "/references/translation/types/translation.FilterQueryProperties"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.FilterValue/page.mdx",
"pathname": "/references/translation/types/translation.FilterValue"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.FilterValue2/page.mdx",
"pathname": "/references/translation/types/translation.FilterValue2"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.FindConfigOrder/page.mdx",
"pathname": "/references/translation/types/translation.FindConfigOrder"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.JoinerRelationship/page.mdx",
"pathname": "/references/translation/types/translation.JoinerRelationship"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.LinkModulesExtraFields/page.mdx",
"pathname": "/references/translation/types/translation.LinkModulesExtraFields"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.Message/page.mdx",
"pathname": "/references/translation/types/translation.Message"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.ModuleJoinerConfig/page.mdx",
"pathname": "/references/translation/types/translation.ModuleJoinerConfig"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.ModuleJoinerRelationship/page.mdx",
"pathname": "/references/translation/types/translation.ModuleJoinerRelationship"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.OperatorMap/page.mdx",
"pathname": "/references/translation/types/translation.OperatorMap"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.PrevLimit/page.mdx",
"pathname": "/references/translation/types/translation.PrevLimit"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.Primary/page.mdx",
"pathname": "/references/translation/types/translation.Primary"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.Query/page.mdx",
"pathname": "/references/translation/types/translation.Query"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.RawMessageFormat/page.mdx",
"pathname": "/references/translation/types/translation.RawMessageFormat"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.ReadonlyPrimary/page.mdx",
"pathname": "/references/translation/types/translation.ReadonlyPrimary"
},
{
"filePath": "/www/apps/resources/references/translation/types/translation.Scalar/page.mdx",
"pathname": "/references/translation/types/translation.Scalar"
},
{
"filePath": "/www/apps/resources/references/translation_models/variables/translation_models.Locale/page.mdx",
"pathname": "/references/translation_models/variables/translation_models.Locale"
},
{
"filePath": "/www/apps/resources/references/translation_models/variables/translation_models.Translation/page.mdx",
"pathname": "/references/translation_models/variables/translation_models.Translation"
},
{ {
"filePath": "/www/apps/resources/references/types/CacheTypes/interfaces/types.CacheTypes.ICacheService/page.mdx", "filePath": "/www/apps/resources/references/types/CacheTypes/interfaces/types.CacheTypes.ICacheService/page.mdx",
"pathname": "/references/types/CacheTypes/interfaces/types.CacheTypes.ICacheService" "pathname": "/references/types/CacheTypes/interfaces/types.CacheTypes.ICacheService"
@@ -6419,6 +6419,14 @@ const generatedgeneratedCommerceModulesSidebarSidebar = {
"path": "https://docs.medusajs.com/user-guide/orders/edit", "path": "https://docs.medusajs.com/user-guide/orders/edit",
"children": [] "children": []
}, },
{
"loaded": true,
"isPathHref": true,
"type": "ref",
"title": "Export Orders",
"path": "https://docs.medusajs.com/user-guide/orders/export",
"children": []
},
{ {
"loaded": true, "loaded": true,
"isPathHref": true, "isPathHref": true,
@@ -15970,6 +15978,14 @@ const generatedgeneratedCommerceModulesSidebarSidebar = {
"type": "category", "type": "category",
"title": "Concepts", "title": "Concepts",
"children": [ "children": [
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/commerce-modules/store/locales",
"title": "Locales",
"children": []
},
{ {
"loaded": true, "loaded": true,
"isPathHref": true, "isPathHref": true,
@@ -16295,6 +16311,15 @@ const generatedgeneratedCommerceModulesSidebarSidebar = {
"title": "StoreCurrency", "title": "StoreCurrency",
"description": "", "description": "",
"children": [] "children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/store/models/StoreLocale",
"title": "StoreLocale",
"description": "",
"children": []
} }
] ]
} }
@@ -17158,6 +17183,357 @@ const generatedgeneratedCommerceModulesSidebarSidebar = {
} }
] ]
}, },
{
"loaded": true,
"isPathHref": true,
"type": "sidebar",
"sidebar_id": "translation",
"title": "Translation Module",
"children": [
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/commerce-modules/translation",
"title": "Overview",
"children": []
},
{
"type": "separator"
},
{
"loaded": true,
"isPathHref": true,
"type": "category",
"title": "Concepts",
"children": [
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/commerce-modules/translation/concepts",
"title": "Concepts",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/commerce-modules/translation/storefront",
"title": "Translation in Storefront",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/commerce-modules/translation/links-to-other-modules",
"title": "Link to Modules",
"children": []
}
]
},
{
"loaded": true,
"isPathHref": true,
"type": "category",
"title": "Storefront Guides",
"autogenerate_tags": "storefront+translation,-jsSdk",
"autogenerate_as_ref": true,
"sort_sidebar": "alphabetize",
"description": "Learn how to integrate the Translation Module's features into your storefront.",
"children": [
{
"loaded": true,
"isPathHref": true,
"type": "ref",
"title": "Storefront Localization",
"path": "https://docs.medusajs.com/resources/storefront-development/localization",
"children": []
}
]
},
{
"loaded": true,
"isPathHref": true,
"type": "category",
"title": "Admin User Guides",
"autogenerate_tags": "userGuide+translation",
"autogenerate_as_ref": true,
"sort_sidebar": "alphabetize",
"description": "Learn how to utilize and manage Translation features in the Medusa Admin dashboard.",
"children": [
{
"loaded": true,
"isPathHref": true,
"type": "ref",
"title": "Manage Store",
"path": "https://docs.medusajs.com/user-guide/settings/store",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "ref",
"title": "Manage Translations",
"path": "https://docs.medusajs.com/user-guide/settings/translations",
"children": []
}
]
},
{
"loaded": true,
"isPathHref": true,
"type": "category",
"title": "References",
"description": "Find references for tools and resources related to the Translation Module, such as data models, methods, and more. These are useful for your customizations.",
"children": [
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/commerce-modules/translation/workflows",
"title": "Workflows",
"hideChildren": true,
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/commerce-modules/translation/js-sdk",
"title": "JS SDK",
"hideChildren": true,
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "sidebar",
"sidebar_id": "translation-service-reference",
"title": "Main Service Reference",
"childSidebarTitle": "Translation Module's Main Service Reference",
"children": [
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation",
"title": "Reference Overview",
"children": []
},
{
"type": "separator"
},
{
"loaded": true,
"isPathHref": true,
"type": "category",
"title": "Methods",
"hasTitleStyling": true,
"autogenerate_path": "/references/translation/ITranslationModuleService/methods",
"children": [
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/createLocales",
"title": "createLocales",
"description": "",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/createTranslations",
"title": "createTranslations",
"description": "",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/deleteLocales",
"title": "deleteLocales",
"description": "",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/deleteTranslations",
"title": "deleteTranslations",
"description": "",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/listAndCountLocales",
"title": "listAndCountLocales",
"description": "",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/listAndCountTranslations",
"title": "listAndCountTranslations",
"description": "",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/listLocales",
"title": "listLocales",
"description": "",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/listTranslations",
"title": "listTranslations",
"description": "",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/restoreLocales",
"title": "restoreLocales",
"description": "",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/restoreTranslations",
"title": "restoreTranslations",
"description": "",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/retrieveLocale",
"title": "retrieveLocale",
"description": "",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/retrieveTranslation",
"title": "retrieveTranslation",
"description": "",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/softDeleteLocales",
"title": "softDeleteLocales",
"description": "",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/softDeleteTranslations",
"title": "softDeleteTranslations",
"description": "",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/updateLocales",
"title": "updateLocales",
"description": "",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/updateTranslations",
"title": "updateTranslations",
"description": "",
"children": []
}
]
}
]
},
{
"loaded": true,
"isPathHref": true,
"type": "sidebar",
"sidebar_id": "translation-models-reference",
"title": "Data Models Reference",
"childSidebarTitle": "Translation Module Data Models Reference",
"children": [
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/models",
"title": "Reference Overview",
"children": []
},
{
"type": "separator"
},
{
"loaded": true,
"isPathHref": true,
"type": "category",
"title": "Data Models",
"hasTitleStyling": true,
"autogenerate_path": "/references/translation_models/variables",
"children": [
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/models/Locale",
"title": "Locale",
"description": "",
"children": []
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/references/translation/models/Translation",
"title": "Translation",
"description": "",
"children": []
}
]
}
]
}
]
}
]
},
{ {
"loaded": true, "loaded": true,
"isPathHref": true, "isPathHref": true,
@@ -35,6 +35,14 @@ const generatedgeneratedStorefrontDevelopmentSidebarSidebar = {
"title": "Publishable API Key", "title": "Publishable API Key",
"children": [] "children": []
}, },
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/storefront-development/localization",
"title": "Localization",
"children": []
},
{ {
"loaded": true, "loaded": true,
"isPathHref": true, "isPathHref": true,
@@ -5249,6 +5249,11 @@ export const slugChanges = [
"newSlug": "/references/tax/models", "newSlug": "/references/tax/models",
"filePath": "/www/apps/resources/references/modules/tax_models/page.mdx" "filePath": "/www/apps/resources/references/modules/tax_models/page.mdx"
}, },
{
"origSlug": "/references/modules/translation_models",
"newSlug": "/references/translation/models",
"filePath": "/www/apps/resources/references/modules/translation_models/page.mdx"
},
{ {
"origSlug": "/references/modules/user_models", "origSlug": "/references/modules/user_models",
"newSlug": "/references/user/models", "newSlug": "/references/user/models",
@@ -7449,6 +7454,11 @@ export const slugChanges = [
"newSlug": "/references/store/models/StoreCurrency", "newSlug": "/references/store/models/StoreCurrency",
"filePath": "/www/apps/resources/references/store_models/variables/store_models.StoreCurrency/page.mdx" "filePath": "/www/apps/resources/references/store_models/variables/store_models.StoreCurrency/page.mdx"
}, },
{
"origSlug": "/references/store_models/variables/store_models.StoreLocale",
"newSlug": "/references/store/models/StoreLocale",
"filePath": "/www/apps/resources/references/store_models/variables/store_models.StoreLocale/page.mdx"
},
{ {
"origSlug": "/references/tax/ITaxModuleService/methods/tax.ITaxModuleService.createTaxRateRules", "origSlug": "/references/tax/ITaxModuleService/methods/tax.ITaxModuleService.createTaxRateRules",
"newSlug": "/references/tax/createTaxRateRules", "newSlug": "/references/tax/createTaxRateRules",
@@ -7594,6 +7604,101 @@ export const slugChanges = [
"newSlug": "/references/tax/provider", "newSlug": "/references/tax/provider",
"filePath": "/www/apps/resources/references/tax_provider/interfaces/tax_provider.ITaxProvider/page.mdx" "filePath": "/www/apps/resources/references/tax_provider/interfaces/tax_provider.ITaxProvider/page.mdx"
}, },
{
"origSlug": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.createLocales",
"newSlug": "/references/translation/createLocales",
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.createLocales/page.mdx"
},
{
"origSlug": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.createTranslations",
"newSlug": "/references/translation/createTranslations",
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.createTranslations/page.mdx"
},
{
"origSlug": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.deleteLocales",
"newSlug": "/references/translation/deleteLocales",
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.deleteLocales/page.mdx"
},
{
"origSlug": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.deleteTranslations",
"newSlug": "/references/translation/deleteTranslations",
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.deleteTranslations/page.mdx"
},
{
"origSlug": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listAndCountLocales",
"newSlug": "/references/translation/listAndCountLocales",
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listAndCountLocales/page.mdx"
},
{
"origSlug": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listAndCountTranslations",
"newSlug": "/references/translation/listAndCountTranslations",
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listAndCountTranslations/page.mdx"
},
{
"origSlug": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listLocales",
"newSlug": "/references/translation/listLocales",
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listLocales/page.mdx"
},
{
"origSlug": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listTranslations",
"newSlug": "/references/translation/listTranslations",
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.listTranslations/page.mdx"
},
{
"origSlug": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.restoreLocales",
"newSlug": "/references/translation/restoreLocales",
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.restoreLocales/page.mdx"
},
{
"origSlug": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.restoreTranslations",
"newSlug": "/references/translation/restoreTranslations",
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.restoreTranslations/page.mdx"
},
{
"origSlug": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.retrieveLocale",
"newSlug": "/references/translation/retrieveLocale",
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.retrieveLocale/page.mdx"
},
{
"origSlug": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.retrieveTranslation",
"newSlug": "/references/translation/retrieveTranslation",
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.retrieveTranslation/page.mdx"
},
{
"origSlug": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.softDeleteLocales",
"newSlug": "/references/translation/softDeleteLocales",
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.softDeleteLocales/page.mdx"
},
{
"origSlug": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.softDeleteTranslations",
"newSlug": "/references/translation/softDeleteTranslations",
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.softDeleteTranslations/page.mdx"
},
{
"origSlug": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.updateLocales",
"newSlug": "/references/translation/updateLocales",
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.updateLocales/page.mdx"
},
{
"origSlug": "/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.updateTranslations",
"newSlug": "/references/translation/updateTranslations",
"filePath": "/www/apps/resources/references/translation/ITranslationModuleService/methods/translation.ITranslationModuleService.updateTranslations/page.mdx"
},
{
"origSlug": "/references/translation/interfaces/translation.ITranslationModuleService",
"newSlug": "/references/translation",
"filePath": "/www/apps/resources/references/translation/interfaces/translation.ITranslationModuleService/page.mdx"
},
{
"origSlug": "/references/translation_models/variables/translation_models.Locale",
"newSlug": "/references/translation/models/Locale",
"filePath": "/www/apps/resources/references/translation_models/variables/translation_models.Locale/page.mdx"
},
{
"origSlug": "/references/translation_models/variables/translation_models.Translation",
"newSlug": "/references/translation/models/Translation",
"filePath": "/www/apps/resources/references/translation_models/variables/translation_models.Translation/page.mdx"
},
{ {
"origSlug": "/references/user/IUserModuleService/methods/user.IUserModuleService.createInvites", "origSlug": "/references/user/IUserModuleService/methods/user.IUserModuleService.createInvites",
"newSlug": "/references/user/createInvites", "newSlug": "/references/user/createInvites",
@@ -14,6 +14,7 @@ This documentation provides a reference to the data models in the Store Module
```mermaid ```mermaid
erDiagram erDiagram
Store ||--|| StoreCurrency : supported_currencies Store ||--|| StoreCurrency : supported_currencies
Store ||--|| StoreLocale : supported_locales
``` ```
@@ -21,3 +22,4 @@ erDiagram
- [Store](../../store_models/variables/store_models.Store/page.mdx) - [Store](../../store_models/variables/store_models.Store/page.mdx)
- [StoreCurrency](../../store_models/variables/store_models.StoreCurrency/page.mdx) - [StoreCurrency](../../store_models/variables/store_models.StoreCurrency/page.mdx)
- [StoreLocale](../../store_models/variables/store_models.StoreLocale/page.mdx)
@@ -0,0 +1,49 @@
import { TypeList } from "docs-ui"
# translation
## Interfaces
- [BaseFilterable](../../translation/interfaces/translation.BaseFilterable/page.mdx)
- [Context](../../translation/interfaces/translation.Context/page.mdx)
- [CreateLocaleDTO](../../translation/interfaces/translation.CreateLocaleDTO/page.mdx)
- [CreateTranslationDTO](../../translation/interfaces/translation.CreateTranslationDTO/page.mdx)
- [FilterableLocaleProps](../../translation/interfaces/translation.FilterableLocaleProps/page.mdx)
- [FilterableTranslationProps](../../translation/interfaces/translation.FilterableTranslationProps/page.mdx)
- [FindConfig](../../translation/interfaces/translation.FindConfig/page.mdx)
- [IMessageAggregator](../../translation/interfaces/translation.IMessageAggregator/page.mdx)
- [IModuleService](../../translation/interfaces/translation.IModuleService/page.mdx)
- [ITranslationModuleService](../../translation/interfaces/translation.ITranslationModuleService/page.mdx)
- [JoinerServiceConfig](../../translation/interfaces/translation.JoinerServiceConfig/page.mdx)
- [JoinerServiceConfigAlias](../../translation/interfaces/translation.JoinerServiceConfigAlias/page.mdx)
- [LocaleDTO](../../translation/interfaces/translation.LocaleDTO/page.mdx)
- [MessageAggregatorFormat](../../translation/interfaces/translation.MessageAggregatorFormat/page.mdx)
- [RestoreReturn](../../translation/interfaces/translation.RestoreReturn/page.mdx)
- [SoftDeleteReturn](../../translation/interfaces/translation.SoftDeleteReturn/page.mdx)
- [TranslationDTO](../../translation/interfaces/translation.TranslationDTO/page.mdx)
- [UpdateLocaleDTO](../../translation/interfaces/translation.UpdateLocaleDTO/page.mdx)
- [UpdateTranslationDTO](../../translation/interfaces/translation.UpdateTranslationDTO/page.mdx)
## Type Aliases
- [Constructor](../../translation/types/translation.Constructor/page.mdx)
- [Event](../../translation/types/translation.Event/page.mdx)
- [EventMetadata](../../translation/types/translation.EventMetadata/page.mdx)
- [ExpandScalar](../../translation/types/translation.ExpandScalar/page.mdx)
- [FilterQuery](../../translation/types/translation.FilterQuery/page.mdx)
- [FilterQueryProperties](../../translation/types/translation.FilterQueryProperties/page.mdx)
- [FilterValue](../../translation/types/translation.FilterValue/page.mdx)
- [FilterValue2](../../translation/types/translation.FilterValue2/page.mdx)
- [FindConfigOrder](../../translation/types/translation.FindConfigOrder/page.mdx)
- [JoinerRelationship](../../translation/types/translation.JoinerRelationship/page.mdx)
- [LinkModulesExtraFields](../../translation/types/translation.LinkModulesExtraFields/page.mdx)
- [Message](../../translation/types/translation.Message/page.mdx)
- [ModuleJoinerConfig](../../translation/types/translation.ModuleJoinerConfig/page.mdx)
- [ModuleJoinerRelationship](../../translation/types/translation.ModuleJoinerRelationship/page.mdx)
- [OperatorMap](../../translation/types/translation.OperatorMap/page.mdx)
- [PrevLimit](../../translation/types/translation.PrevLimit/page.mdx)
- [Primary](../../translation/types/translation.Primary/page.mdx)
- [Query](../../translation/types/translation.Query/page.mdx)
- [RawMessageFormat](../../translation/types/translation.RawMessageFormat/page.mdx)
- [ReadonlyPrimary](../../translation/types/translation.ReadonlyPrimary/page.mdx)
- [Scalar](../../translation/types/translation.Scalar/page.mdx)
@@ -0,0 +1,15 @@
---
displayed_sidebar: translationModelReference
slug: /references/translation/models
---
import { TypeList } from "docs-ui"
# Translation Module Data Models Reference
This documentation provides a reference to the data models in the Translation Module
## Data Models
- [Locale](../../translation_models/variables/translation_models.Locale/page.mdx)
- [Translation](../../translation_models/variables/translation_models.Translation/page.mdx)
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the Store data model. It belongs to the Store Module. This documentation provides a reference to the Store data model. It belongs to the Store Module.
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/da5d0e3a1430979ab9cda7f239ea7066ded1f7ab/packages/modules/store/src/models/store.ts#L4" /> <SourceCodeLink link="https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/store/src/models/store.ts#L5" />
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`TextProperty`","description":"The name of the store","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"HasMany&#60;[StoreCurrency](../store_models.StoreCurrency/page.mdx)&#62;","description":"The associated supported\\_currencies.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"Whether the currency is the default in the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](./page.mdx)&#62;","description":"The store this currency belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`TextProperty`","description":"The name of the store","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"HasMany&#60;[StoreCurrency](../store_models.StoreCurrency/page.mdx)&#62;","description":"The associated supported\\_currencies.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"default_sales_channel_id","type":"`TextProperty`","description":"The ID of the store's default sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`TextProperty`","description":"The ID of the store's default region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`TextProperty`","description":"The ID of the store's default stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"default_sales_channel_id","type":"`TextProperty`","description":"The ID of the store's default sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`TextProperty`","description":"The ID of the store's default region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`TextProperty`","description":"The ID of the store's default stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Store"/> <TypeList types={[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`TextProperty`","description":"The name of the store","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"HasMany&#60;[StoreCurrency](../store_models.StoreCurrency/page.mdx)&#62;","description":"The associated supported\\_currencies.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"Whether the currency is the default in the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](./page.mdx)&#62;","description":"The store this currency belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`TextProperty`","description":"The name of the store","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"HasMany&#60;[StoreCurrency](../store_models.StoreCurrency/page.mdx)&#62;","description":"The associated supported\\_currencies.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"supported_locales","type":"HasMany&#60;[StoreLocale](../store_models.StoreLocale/page.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_sales_channel_id","type":"`TextProperty`","description":"The ID of the store's default sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`TextProperty`","description":"The ID of the store's default region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`TextProperty`","description":"The ID of the store's default stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"supported_locales","type":"HasMany&#60;[StoreLocale](../store_models.StoreLocale/page.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`TextProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](./page.mdx)&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`TextProperty`","description":"The name of the store","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"HasMany&#60;[StoreCurrency](../store_models.StoreCurrency/page.mdx)&#62;","description":"The associated supported\\_currencies.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"supported_locales","type":"HasMany&#60;[StoreLocale](../store_models.StoreLocale/page.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_sales_channel_id","type":"`TextProperty`","description":"The ID of the store's default sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`TextProperty`","description":"The ID of the store's default region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`TextProperty`","description":"The ID of the store's default stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"default_sales_channel_id","type":"`TextProperty`","desLine truncated
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the StoreCurrency data model. It belongs to the Store Module. This documentation provides a reference to the StoreCurrency data model. It belongs to the Store Module.
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/da5d0e3a1430979ab9cda7f239ea7066ded1f7ab/packages/modules/store/src/models/currency.ts#L4" /> <SourceCodeLink link="https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/store/src/models/currency.ts#L4" />
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"Whether the currency is the default in the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](../store_models.Store/page.mdx)&#62;","description":"The store this currency belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`TextProperty`","description":"The name of the store","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"HasMany&#60;[StoreCurrency](./page.mdx)&#62;","description":"The associated supported\\_currencies.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"Whether the currency is the default in the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](../store_models.Store/page.mdx)&#62;","description":"The store this currency belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"default_sales_channel_id","type":"`TextProperty`","description":"The ID of the store's default sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`TextProperty`","description":"The ID of the store's default region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`TextProperty`","description":"The ID of the store's default stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="StoreCurrency"/> <TypeList types={[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"Whether the currency is the default in the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](../store_models.Store/page.mdx)&#62;","description":"The store this currency belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`TextProperty`","description":"The name of the store","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"HasMany&#60;[StoreCurrency](./page.mdx)&#62;","description":"The associated supported\\_currencies.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"Whether the currency is the default in the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](../store_models.Store/page.mdx)&#62;","description":"The store this currency belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"supported_locales","type":"HasMany&#60;[StoreLocale](../store_models.StoreLocale/page.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`TextProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](../store_models.Store/page.mdx)&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"default_sales_channel_id","type":"`TextProperty`","description":"The ID of the store's default sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`TextProperty`","description":"The ID of the store's default region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`TextProperty`","description":"The ID of the store's default stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="StoreCurrency"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: storeModelReference
slug: /references/store/models/StoreLocale
sidebar_label: StoreLocale
---
import { TypeList } from "docs-ui"
# StoreLocale - Store Module Data Models Reference
This documentation provides a reference to the StoreLocale data model. It belongs to the Store Module.
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/store/src/models/locale.ts#L4" />
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`TextProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](../store_models.Store/page.mdx)&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`TextProperty`","description":"The name of the store","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"HasMany&#60;[StoreCurrency](../store_models.StoreCurrency/page.mdx)&#62;","description":"The associated supported\\_currencies.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"The ID of the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The ISO 3 currency code. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"Whether the currency is the default in the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](../store_models.Store/page.mdx)&#62;","description":"The store this currency belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"supported_locales","type":"HasMany&#60;[StoreLocale](./page.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"PrimaryKeyModifier&#60;IdProperty&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`TextProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`BooleanProperty`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"BelongsTo&#60;[Store](../store_models.Store/page.mdx)&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"default_sales_channel_id","type":"`TextProperty`","description":"The ID of the store's default sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`TextProperty`","description":"The ID of the store's default region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`TextProperty`","description":"The ID of the store's default stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`JSONProperty`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="StoreLocale"/>
@@ -0,0 +1,7 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# clearMessages
@@ -0,0 +1,15 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# getMessages
## Parameters
<TypeList types={[{"name":"format","type":"[MessageAggregatorFormat](../../../interfaces/translation.MessageAggregatorFormat/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"groupBy","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sortBy","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal","type":"`boolean`","description":"will prevent the info log to be displayed about those events","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getMessages"/>
## Returns
<TypeList types={[{"name":"Record","type":"`Record<string, [Message](../../../types/translation.Message/page.mdx)[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"Message[]","type":"[Message](../../../types/translation.Message/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. &#123; id: \"123\" &#125; or &#123; ids: [\"123\", \"456\"] &#125;)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../../../types/translation.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getMessages"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# save
## Parameters
<TypeList types={[{"name":"msg","type":"[Message](../../../types/translation.Message/page.mdx) \\| [Message](../../../types/translation.Message/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. &#123; id: \"123\" &#125; or &#123; ids: [\"123\", \"456\"] &#125;)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../../../types/translation.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="save"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# saveRawMessageData
## Parameters
<TypeList types={[{"name":"messageData","type":"[RawMessageFormat](../../../types/translation.RawMessageFormat/page.mdx)&#60;T&#62; \\| [RawMessageFormat](../../../types/translation.RawMessageFormat/page.mdx)&#60;T&#62;[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"eventName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"source","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"Pick&#60;[Context](../../../interfaces/translation.Context/page.mdx), \"eventGroupId\"&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="saveRawMessageData"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# \_\_joinerConfig
## Returns
<TypeList types={[{"name":"alias","type":"[JoinerServiceConfigAlias](../../../interfaces/translation.JoinerServiceConfigAlias/page.mdx) \\| [JoinerServiceConfigAlias](../../../interfaces/translation.JoinerServiceConfigAlias/page.mdx)[]","description":"Property name to use as entrypoint to the service","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filterable","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record<string, string \\| object>`","description":"alias for deeper nested relationships (e.g. &#123; 'price': 'prices.calculated\\_price\\_set.amount' &#125;)","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"schema","type":"`string`","description":"GraphQL schema for the all module's available entities and fields","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idPrefixToEntityName","type":"`Record<string, string>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relationships","type":"[ModuleJoinerRelationship](../../../types/translation.ModuleJoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleteCascade","type":"`boolean`","description":"If true, the link joiner will cascade deleting the relationship","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filterable","type":"`string`[]","description":"The fields to be filterable by the Index module using query.index","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hasMany","type":"`boolean`","description":"Allow multiple relationships to exist for this\nentity","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"Omit&#60;[ModuleJoinerRelationship](../../../types/translation.ModuleJoinerRelationship/page.mdx), \"hasMany\"&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expLine truncated
@@ -0,0 +1,41 @@
---
displayed_sidebar: translationReference
slug: /references/translation/createLocales
sidebar_label: createLocales
---
import { TypeList } from "docs-ui"
# createLocales - Translation Module Reference
This documentation provides a reference to the `createLocales` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## createLocales(data, sharedContext?): Promise&#60;[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)&#62;
This method creates a locale.
### Parameters
<TypeList types={[{"name":"data","type":"[CreateLocaleDTO](../../../interfaces/translation.CreateLocaleDTO/page.mdx)","description":"The locale to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale (e.g., \"English (United States)\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the locale to create.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createLocales"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The created locale.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the locale.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale (e.g., \"English (United States)\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the locale was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the locale was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the locale was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createLocales"/>
## createLocales(data, sharedContext?): Promise&#60;[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)[]&#62;
This method creates locales.
### Parameters
<TypeList types={[{"name":"data","type":"[CreateLocaleDTO](../../../interfaces/translation.CreateLocaleDTO/page.mdx)[]","description":"The locales to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale (e.g., \"English (United States)\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the locale to create.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createLocales"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The created locales.","expandable":false,"children":[{"name":"LocaleDTO[]","type":"[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the locale.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale (e.g., \"English (United States)\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the locale was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the locale was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the locale was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createLocales"/>
@@ -0,0 +1,41 @@
---
displayed_sidebar: translationReference
slug: /references/translation/createTranslations
sidebar_label: createTranslations
---
import { TypeList } from "docs-ui"
# createTranslations - Translation Module Reference
This documentation provides a reference to the `createTranslations` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## createTranslations(data, sharedContext?): Promise&#60;[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)&#62;
This method creates a translation.
### Parameters
<TypeList types={[{"name":"data","type":"[CreateTranslationDTO](../../../interfaces/translation.CreateTranslationDTO/page.mdx)","description":"The translation to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated (e.g., \"product\", \"product\\_variant\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createTranslations"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The created translation.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the translation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated (e.g., \"product\", \"product\\_variant\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the translation was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the translation was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the translation was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createTranslations"/>
## createTranslations(data, sharedContext?): Promise&#60;[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)[]&#62;
This method creates translations.
### Parameters
<TypeList types={[{"name":"data","type":"[CreateTranslationDTO](../../../interfaces/translation.CreateTranslationDTO/page.mdx)[]","description":"The translations to be created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated (e.g., \"product\", \"product\\_variant\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createTranslations"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The created translations.","expandable":false,"children":[{"name":"TranslationDTO[]","type":"[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the translation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated (e.g., \"product\", \"product\\_variant\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the translation was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the translation was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the translation was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createTranslations"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: translationReference
slug: /references/translation/deleteLocales
sidebar_label: deleteLocales
---
import { TypeList } from "docs-ui"
# deleteLocales - Translation Module Reference
This documentation provides a reference to the `deleteLocales` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method deletes locales by their IDs or objects.
## Parameters
<TypeList types={[{"name":"primaryKeyValues","type":"`string` \\| `object` \\| `string`[] \\| `object`[]","description":"The IDs or objects identifying the locales to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteLocales"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves when the locales are deleted.","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteLocales"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: translationReference
slug: /references/translation/deleteTranslations
sidebar_label: deleteTranslations
---
import { TypeList } from "docs-ui"
# deleteTranslations - Translation Module Reference
This documentation provides a reference to the `deleteTranslations` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method deletes translations by their IDs or objects.
## Parameters
<TypeList types={[{"name":"primaryKeyValues","type":"`string` \\| `object` \\| `string`[] \\| `object`[]","description":"The IDs or objects identifying the translations to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteTranslations"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves when the translations are deleted.","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteTranslations"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: translationReference
slug: /references/translation/listAndCountLocales
sidebar_label: listAndCountLocales
---
import { TypeList } from "docs-ui"
# listAndCountLocales - Translation Module Reference
This documentation provides a reference to the `listAndCountLocales` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method retrieves a paginated list of locales along with the total count.
## Parameters
<TypeList types={[{"name":"filters","type":"[FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx)","description":"The filters to apply on the retrieved locales.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the locales by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter locales by their code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter locales by their name.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the locales by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter locales by their code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter locales by their name.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the locales by.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../types/translation.Query/page.mdx)&#60;T&#62;[]","description":"","optLine truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"The list of locales along with their total count.","expandable":false,"children":[{"name":"LocaleDTO[]","type":"[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAndCountLocales"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: translationReference
slug: /references/translation/listAndCountTranslations
sidebar_label: listAndCountTranslations
---
import { TypeList } from "docs-ui"
# listAndCountTranslations - Translation Module Reference
This documentation provides a reference to the `listAndCountTranslations` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method retrieves a paginated list of translations along with the total count.
## Parameters
<TypeList types={[{"name":"filters","type":"[FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx)","description":"The filters to apply on the retrieved translations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search through translated content using this search term.\nThis searches within the JSONB translations field values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the translations by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter translations by entity ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter translations by entity type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter translations by locale code.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search through translated content using this search term.\nThis searches within the JSONB translations field values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the translations by.","optionaLine truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)[], number]&#62;","optional":false,"defaultValue":"","description":"The list of translations along with their total count.","expandable":false,"children":[{"name":"TranslationDTO[]","type":"[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]},{"name":"number","type":"`number`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAndCountTranslations"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: translationReference
slug: /references/translation/listLocales
sidebar_label: listLocales
---
import { TypeList } from "docs-ui"
# listLocales - Translation Module Reference
This documentation provides a reference to the `listLocales` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method retrieves a paginated list of locales based on optional filters and configuration.
## Parameters
<TypeList types={[{"name":"filters","type":"[FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx)","description":"The filters to apply on the retrieved locales.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the locales by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter locales by their code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter locales by their name.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](../../../interfaces/translation.FilterableLocaleProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the locales by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter locales by their code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter locales by their name.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the locales by.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../types/translation.Query/page.mdx)&#60;T&#62;[]","description":"","optLine truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of locales.","expandable":false,"children":[{"name":"LocaleDTO[]","type":"[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the locale.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale (e.g., \"English (United States)\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the locale was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the locale was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the locale was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listLocales"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: translationReference
slug: /references/translation/listTranslations
sidebar_label: listTranslations
---
import { TypeList } from "docs-ui"
# listTranslations - Translation Module Reference
This documentation provides a reference to the `listTranslations` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method retrieves a paginated list of translations based on optional filters and configuration.
## Parameters
<TypeList types={[{"name":"filters","type":"[FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx)","description":"The filters to apply on the retrieved translations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search through translated content using this search term.\nThis searches within the JSONB translations field values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the translations by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter translations by entity ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter translations by entity type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter translations by locale code.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx) \\| [BaseFilterable](../../../interfaces/translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](../../../interfaces/translation.FilterableTranslationProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search through translated content using this search term.\nThis searches within the JSONB translations field values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../types/translation.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the translations by.","optionaLine truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of translations.","expandable":false,"children":[{"name":"TranslationDTO[]","type":"[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the translation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated (e.g., \"product\", \"product\\_variant\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the translation was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the translation was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the translation was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listTranslations"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: translationReference
slug: /references/translation/restoreLocales
sidebar_label: restoreLocales
---
import { TypeList } from "docs-ui"
# restoreLocales - Translation Module Reference
This documentation provides a reference to the `restoreLocales` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method restores soft deleted locales by their IDs or objects.
## Parameters
<TypeList types={[{"name":"primaryKeyValues","type":"`string` \\| `object` \\| `string`[] \\| `object`[]","description":"The IDs or objects identifying the locales to restore.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[RestoreReturn](../../../interfaces/translation.RestoreReturn/page.mdx)&#60;TReturnableLinkableKeys&#62;","description":"Configurations determining which relations to restore.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="restoreLocales"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| Record&#60;string, string[]&#62;&#62;","optional":false,"defaultValue":"","description":"An object with IDs of related records that were restored.","expandable":false,"children":[{"name":"void \\| Record&#60;string, string[]&#62;","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="restoreLocales"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: translationReference
slug: /references/translation/restoreTranslations
sidebar_label: restoreTranslations
---
import { TypeList } from "docs-ui"
# restoreTranslations - Translation Module Reference
This documentation provides a reference to the `restoreTranslations` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method restores soft deleted translations by their IDs or objects.
## Parameters
<TypeList types={[{"name":"primaryKeyValues","type":"`string` \\| `object` \\| `string`[] \\| `object`[]","description":"The IDs or objects identifying the translations to restore.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[RestoreReturn](../../../interfaces/translation.RestoreReturn/page.mdx)&#60;TReturnableLinkableKeys&#62;","description":"Configurations determining which relations to restore.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="restoreTranslations"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| Record&#60;string, string[]&#62;&#62;","optional":false,"defaultValue":"","description":"An object with IDs of related records that were restored.","expandable":false,"children":[{"name":"void \\| Record&#60;string, string[]&#62;","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="restoreTranslations"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: translationReference
slug: /references/translation/retrieveLocale
sidebar_label: retrieveLocale
---
import { TypeList } from "docs-ui"
# retrieveLocale - Translation Module Reference
This documentation provides a reference to the `retrieveLocale` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method retrieves a locale by its ID.
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the locale.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../../interfaces/translation.FindConfig/page.mdx)&#60;[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)&#62;","description":"The configurations determining how the locale is retrieved.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` & `object` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.\n\nYou can only retrieve data models defined in the same module. To retrieve linked data models\nfrom other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[FindConfigOrder](../../../types/translation.FindConfigOrder/page.mdx)","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","typeLine truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The retrieved locale.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the locale.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale (e.g., \"English (United States)\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the locale was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the locale was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the locale was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieveLocale"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: translationReference
slug: /references/translation/retrieveTranslation
sidebar_label: retrieveTranslation
---
import { TypeList } from "docs-ui"
# retrieveTranslation - Translation Module Reference
This documentation provides a reference to the `retrieveTranslation` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method retrieves a translation by its ID.
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the translation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../../interfaces/translation.FindConfig/page.mdx)&#60;[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)&#62;","description":"The configurations determining how the translation is retrieved.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"select","type":"(`string` & `object` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.\n\nYou can only retrieve data models defined in the same module. To retrieve linked data models\nfrom other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[FindConfigOrder](../../../types/translation.FindConfigOrder/page.mdx)","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The retrieved translation.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the translation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated (e.g., \"product\", \"product\\_variant\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the translation was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the translation was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the translation was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieveTranslation"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: translationReference
slug: /references/translation/softDeleteLocales
sidebar_label: softDeleteLocales
---
import { TypeList } from "docs-ui"
# softDeleteLocales - Translation Module Reference
This documentation provides a reference to the `softDeleteLocales` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method soft deletes locales by their IDs or objects.
## Parameters
<TypeList types={[{"name":"primaryKeyValues","type":"`string` \\| `object` \\| `string`[] \\| `object`[]","description":"The IDs or objects identifying the locales to soft delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[SoftDeleteReturn](../../../interfaces/translation.SoftDeleteReturn/page.mdx)&#60;TReturnableLinkableKeys&#62;","description":"An object for related entities that should be soft-deleted.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="softDeleteLocales"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| Record&#60;string, string[]&#62;&#62;","optional":false,"defaultValue":"","description":"An object with IDs of related records that were also soft deleted.","expandable":false,"children":[{"name":"void \\| Record&#60;string, string[]&#62;","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="softDeleteLocales"/>
@@ -0,0 +1,27 @@
---
displayed_sidebar: translationReference
slug: /references/translation/softDeleteTranslations
sidebar_label: softDeleteTranslations
---
import { TypeList } from "docs-ui"
# softDeleteTranslations - Translation Module Reference
This documentation provides a reference to the `softDeleteTranslations` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
This method soft deletes translations by their IDs or objects.
## Parameters
<TypeList types={[{"name":"primaryKeyValues","type":"`string` \\| `object` \\| `string`[] \\| `object`[]","description":"The IDs or objects identifying the translations to soft delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[SoftDeleteReturn](../../../interfaces/translation.SoftDeleteReturn/page.mdx)&#60;TReturnableLinkableKeys&#62;","description":"An object for related entities that should be soft-deleted.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="softDeleteTranslations"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void \\| Record&#60;string, string[]&#62;&#62;","optional":false,"defaultValue":"","description":"An object with IDs of related records that were also soft deleted.","expandable":false,"children":[{"name":"void \\| Record&#60;string, string[]&#62;","type":"`void` \\| `Record<string, string[]>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="softDeleteTranslations"/>
@@ -0,0 +1,41 @@
---
displayed_sidebar: translationReference
slug: /references/translation/updateLocales
sidebar_label: updateLocales
---
import { TypeList } from "docs-ui"
# updateLocales - Translation Module Reference
This documentation provides a reference to the `updateLocales` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## updateLocales(data, sharedContext?): Promise&#60;[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)&#62;
This method updates an existing locale. The ID should be included in the data object.
### Parameters
<TypeList types={[{"name":"data","type":"[UpdateLocaleDTO](../../../interfaces/translation.UpdateLocaleDTO/page.mdx)","description":"The attributes to update in the locale (including id).","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the locale to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateLocales"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The updated locale.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the locale.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale (e.g., \"English (United States)\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the locale was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the locale was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the locale was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateLocales"/>
## updateLocales(dataOrOptions, sharedContext?): Promise&#60;[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)[]&#62;
This method updates existing locales using an array or selector-based approach.
### Parameters
<TypeList types={[{"name":"dataOrOptions","type":"[UpdateLocaleDTO](../../../interfaces/translation.UpdateLocaleDTO/page.mdx)[] \\| `object`","description":"The data or options for bulk update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the locale to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"selector","type":"`Record<string, any>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"[UpdateLocaleDTO](../../../interfaces/translation.UpdateLocaleDTO/page.mdx) \\| [UpdateLocaleDTO](../../../interfaces/translation.UpdateLocaleDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the locale to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultVaLine truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The updated locales.","expandable":false,"children":[{"name":"LocaleDTO[]","type":"[LocaleDTO](../../../interfaces/translation.LocaleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the locale.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale (e.g., \"English (United States)\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the locale was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the locale was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the locale was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateLocales"/>
@@ -0,0 +1,41 @@
---
displayed_sidebar: translationReference
slug: /references/translation/updateTranslations
sidebar_label: updateTranslations
---
import { TypeList } from "docs-ui"
# updateTranslations - Translation Module Reference
This documentation provides a reference to the `updateTranslations` method. This belongs to the Translation Module.
<Note>
You should only use this methods when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
## updateTranslations(data, sharedContext?): Promise&#60;[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)&#62;
This method updates an existing translation. The ID should be included in the data object.
### Parameters
<TypeList types={[{"name":"data","type":"[UpdateTranslationDTO](../../../interfaces/translation.UpdateTranslationDTO/page.mdx)","description":"The attributes to update in the translation (including id).","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the translation to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateTranslations"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The updated translation.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the translation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated (e.g., \"product\", \"product\\_variant\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the translation was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the translation was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the translation was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateTranslations"/>
## updateTranslations(dataOrOptions, sharedContext?): Promise&#60;[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)[]&#62;
This method updates existing translations using an array or selector-based approach.
### Parameters
<TypeList types={[{"name":"dataOrOptions","type":"[UpdateTranslationDTO](../../../interfaces/translation.UpdateTranslationDTO/page.mdx)[] \\| `object`","description":"The data or options for bulk update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the translation to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"selector","type":"`Record<string, any>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"[UpdateTranslationDTO](../../../interfaces/translation.UpdateTranslationDTO/page.mdx) \\| [UpdateTranslationDTO](../../../interfaces/translation.UpdateTranslationDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the translation to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"sharedContext","type":"[Context](../../../interfaces/translation.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../../../interfaces/translation.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`",Line truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The updated translations.","expandable":false,"children":[{"name":"TranslationDTO[]","type":"[TranslationDTO](../../../interfaces/translation.TranslationDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the translation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated (e.g., \"product\", \"product\\_variant\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the translation was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the translation was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the translation was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateTranslations"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# BaseFilterable
An object used to allow specifying flexible queries with and/or conditions.
## Type parameters
<TypeList types={[{"name":"T","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="BaseFilterable"/>
<TypeList types={[{"name":"$and","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"$or","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](./page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="BaseFilterable"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# Context
A context used to share resources, such as transaction manager, between the application and the module.
## Type parameters
<TypeList types={[{"name":"TManager","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Context"/>
<TypeList types={[{"name":"__type","type":"`\"MedusaContext\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"A string indicating the ID of the current run.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../translation.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parentStepIdempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the parent workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"preventReleaseEvents","type":"`boolean`","description":"preventReleaseEvents","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isCancelling","type":"`boolean`","description":"A boolean value indicating whether the current workflow execution is being cancelled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelingFromParentStep","type":"`boolean`","description":"Weither or not a sub workflow cancellation is being triggered from a parent step.\nIf true, the parent step will not be triggered by the sub workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Context"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# CreateLocaleDTO
The locale to be created.
<TypeList types={[{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale (e.g., \"English (United States)\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the locale to create.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="CreateLocaleDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# CreateTranslationDTO
The translation to be created.
<TypeList types={[{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated (e.g., \"product\", \"product\\_variant\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="CreateTranslationDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# FilterableLocaleProps
The filters to apply on the retrieved locales.
<TypeList types={[{"name":"$and","type":"([FilterableLocaleProps](./page.mdx) \\| [BaseFilterable](../translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](./page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableLocaleProps](./page.mdx) \\| [BaseFilterable](../translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](./page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableLocaleProps](./page.mdx) \\| [BaseFilterable](../translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](./page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableLocaleProps](./page.mdx) \\| [BaseFilterable](../translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](./page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/translation.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the locales by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter locales by their code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| [OperatorMap](../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter locales by their name.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableLocaleProps](./page.mdx) \\| [BaseFilterable](../translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](./page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableLocaleProps](./page.mdx) \\| [BaseFilterable](../translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](./page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableLocaleProps](./page.mdx) \\| [BaseFilterable](../translation.BaseFilterable/page.mdx)&#60;[FilterableLocaleProps](./page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/translation.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the locales by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter locales by their code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| [OperatorMap](../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter locales by their name.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/translation.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the locales by.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../types/translation.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../types/translation.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../types/translation.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../types/translation.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../types/translation.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultVaLine truncated
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# FilterableTranslationProps
The filters to apply on the retrieved translations.
<TypeList types={[{"name":"$and","type":"([FilterableTranslationProps](./page.mdx) \\| [BaseFilterable](../translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](./page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTranslationProps](./page.mdx) \\| [BaseFilterable](../translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](./page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTranslationProps](./page.mdx) \\| [BaseFilterable](../translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](./page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableTranslationProps](./page.mdx) \\| [BaseFilterable](../translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](./page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search through translated content using this search term.\nThis searches within the JSONB translations field values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/translation.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the translations by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter translations by entity ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter translations by entity type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter translations by locale code.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableTranslationProps](./page.mdx) \\| [BaseFilterable](../translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](./page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableTranslationProps](./page.mdx) \\| [BaseFilterable](../translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](./page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableTranslationProps](./page.mdx) \\| [BaseFilterable](../translation.BaseFilterable/page.mdx)&#60;[FilterableTranslationProps](./page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search through translated content using this search term.\nThis searches within the JSONB translations field values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/translation.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the translations by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter translations by entity ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/translation.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter translations by entity type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/translation.OperatorMap/page.mdx)&#60Line truncated
@@ -0,0 +1,16 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# FindConfig
An object that is used to configure how an entity is retrieved from the database. It accepts as a typed parameter an `Entity` class,
which provides correct typing of field names in its properties.
## Type parameters
<TypeList types={[{"name":"Entity","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="FindConfig"/>
<TypeList types={[{"name":"select","type":"(`string` & `object` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.\n\nYou can only retrieve data models defined in the same module. To retrieve linked data models\nfrom other modules, use [Query](https://docs.medusajs.com/learn/fundamentals/module-links/query) instead.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[FindConfigOrder](../../types/translation.FindConfigOrder/page.mdx)","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`Record<string, any>`","description":"Enable ORM specific defined options","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="FindConfig"/>
@@ -0,0 +1,14 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# IMessageAggregator
## Methods
- [clearMessages](../../IMessageAggregator/methods/translation.IMessageAggregator.clearMessages/page.mdx)
- [getMessages](../../IMessageAggregator/methods/translation.IMessageAggregator.getMessages/page.mdx)
- [save](../../IMessageAggregator/methods/translation.IMessageAggregator.save/page.mdx)
- [saveRawMessageData](../../IMessageAggregator/methods/translation.IMessageAggregator.saveRawMessageData/page.mdx)
@@ -0,0 +1,19 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# IModuleService
## Methods
- [\_\_joinerConfig](../../IModuleService/methods/translation.IModuleService.__joinerConfig/page.mdx)
## Properties
- [\_\_hooks](page.mdx#__hooks)
___
<TypeList types={[{"name":"__hooks","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"onApplicationStart","type":"() => Promise&#60;void&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"onApplicationShutdown","type":"() => Promise&#60;void&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"onApplicationPrepareShutdown","type":"() => Promise&#60;void&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="IModuleService"/>
@@ -0,0 +1,38 @@
---
displayed_sidebar: translationReference
slug: /references/translation
---
import { TypeList } from "docs-ui"
# ITranslationModuleService Reference
This section of the documentation provides a reference to the `ITranslationModuleService` interface’s methods. This is the interface developers use to use the functionalities provided by the Translation Module.
<Note>
You should only use the methods in this reference when implementing complex customizations. For common cases, check out [available workflows instead](/medusa-workflows-reference).
</Note>
The main service interface for the Translation Module.
Method signatures match what MedusaService generates.
## Methods
- [createLocales](../../ITranslationModuleService/methods/translation.ITranslationModuleService.createLocales/page.mdx)
- [createTranslations](../../ITranslationModuleService/methods/translation.ITranslationModuleService.createTranslations/page.mdx)
- [deleteLocales](../../ITranslationModuleService/methods/translation.ITranslationModuleService.deleteLocales/page.mdx)
- [deleteTranslations](../../ITranslationModuleService/methods/translation.ITranslationModuleService.deleteTranslations/page.mdx)
- [listAndCountLocales](../../ITranslationModuleService/methods/translation.ITranslationModuleService.listAndCountLocales/page.mdx)
- [listAndCountTranslations](../../ITranslationModuleService/methods/translation.ITranslationModuleService.listAndCountTranslations/page.mdx)
- [listLocales](../../ITranslationModuleService/methods/translation.ITranslationModuleService.listLocales/page.mdx)
- [listTranslations](../../ITranslationModuleService/methods/translation.ITranslationModuleService.listTranslations/page.mdx)
- [restoreLocales](../../ITranslationModuleService/methods/translation.ITranslationModuleService.restoreLocales/page.mdx)
- [restoreTranslations](../../ITranslationModuleService/methods/translation.ITranslationModuleService.restoreTranslations/page.mdx)
- [retrieveLocale](../../ITranslationModuleService/methods/translation.ITranslationModuleService.retrieveLocale/page.mdx)
- [retrieveTranslation](../../ITranslationModuleService/methods/translation.ITranslationModuleService.retrieveTranslation/page.mdx)
- [softDeleteLocales](../../ITranslationModuleService/methods/translation.ITranslationModuleService.softDeleteLocales/page.mdx)
- [softDeleteTranslations](../../ITranslationModuleService/methods/translation.ITranslationModuleService.softDeleteTranslations/page.mdx)
- [updateLocales](../../ITranslationModuleService/methods/translation.ITranslationModuleService.updateLocales/page.mdx)
- [updateTranslations](../../ITranslationModuleService/methods/translation.ITranslationModuleService.updateTranslations/page.mdx)
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# JoinerServiceConfig
<TypeList types={[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKeys","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"alias","type":"[JoinerServiceConfigAlias](../translation.JoinerServiceConfigAlias/page.mdx) \\| [JoinerServiceConfigAlias](../translation.JoinerServiceConfigAlias/page.mdx)[]","description":"Property name to use as entrypoint to the service","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filterable","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fieldAlias","type":"`Record<string, string \\| object>`","description":"alias for deeper nested relationships (e.g. &#123; 'price': 'prices.calculated\\_price\\_set.amount' &#125;)","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"path","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"forwardArgumentsOnPath","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"relationships","type":"[JoinerRelationship](../../types/translation.JoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[JoinerRelationship](../../types/translation.JoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children"Line truncated
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# JoinerServiceConfigAlias
<TypeList types={[{"name":"name","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filterable","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="JoinerServiceConfigAlias"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# LocaleDTO
The locale details.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the locale.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale (e.g., \"English (United States)\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the locale was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the locale was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the locale was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="LocaleDTO"/>
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# MessageAggregatorFormat
<TypeList types={[{"name":"groupBy","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sortBy","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal","type":"`boolean`","description":"will prevent the info log to be displayed about those events","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="MessageAggregatorFormat"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# RestoreReturn
An object that is used to specify an entity's related entities that should be restored when the main entity is restored.
## Type parameters
<TypeList types={[{"name":"TReturnableLinkableKeys","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="RestoreReturn"/>
<TypeList types={[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="RestoreReturn"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# SoftDeleteReturn
An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
## Type parameters
<TypeList types={[{"name":"TReturnableLinkableKeys","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="SoftDeleteReturn"/>
<TypeList types={[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="SoftDeleteReturn"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# TranslationDTO
The translation details.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the translation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated (e.g., \"product\", \"product\\_variant\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation (e.g., \"en-US\", \"fr-FR\").","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date and time the translation was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date and time the translation was last updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date and time the translation was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="TranslationDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# UpdateLocaleDTO
The attributes to update in the locale.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the locale to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The BCP 47 language tag code of the locale.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The human-readable name of the locale.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UpdateLocaleDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# UpdateTranslationDTO
The attributes to update in the translation.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the translation to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the entity being translated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reference","type":"`string`","description":"The type of entity being translated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"locale_code","type":"`string`","description":"The BCP 47 language tag code for this translation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"translations","type":"`Record<string, unknown>`","description":"The translated fields as key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UpdateTranslationDTO"/>
@@ -0,0 +1,13 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# Constructor
**Constructor**: (...`args`: `any`[]) => T \| () => T
## Parameters
<TypeList types={[{"name":"args","type":"`any`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# Event
**Event**: `Object`
<TypeList types={[{"name":"name","type":"`string`","description":"The event's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"The data payload that subscribers receive. For example, the ID or IDs of the created user. (e.g. &#123; id: \"123\" &#125; or &#123; ids: [\"123\", \"456\"] &#125;)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[EventMetadata](../translation.EventMetadata/page.mdx)","description":"Additional meadata to pass with the event.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"The ID of the event's group. Grouped events are useful when you have distributed transactions\nwhere you need to explicitly group, release and clear events upon lifecycle events of a transaction.\n\nWhen set, you must release the grouped events using the Event Module's `releaseGroupedEvents` method to emit the events.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="Event"/>
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# EventMetadata
**EventMetadata**: `Record<string, unknown>` & `object`
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# ExpandScalar
**ExpandScalar**: `null` \| T extends `string` ? `string` \| `RegExp` : T extends `Date` ? `Date` \| `string` : T
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# FilterQuery
**FilterQuery**: Prev extends `never` ? `never` : T extends [Constructor](../translation.Constructor/page.mdx)&#60;infer Prototype&#62; ? [FilterQueryProperties](../translation.FilterQueryProperties/page.mdx)&#60;Prototype, Prev&#62; : [FilterQueryProperties](../translation.FilterQueryProperties/page.mdx)&#60;T, Prev&#62;
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# FilterQueryProperties
**FilterQueryProperties**: &#123; [Key in keyof T]?: T[Key] extends boolean \| number \| string \| bigint \| symbol \| Date ? T[Key] \| OperatorMap&#60;T[Key]&#62; : T[Key] extends infer U ? U extends (x: number) =&#62; V ? V extends object ? FilterQuery&#60;Partial&#60;V&#62;, PrevLimit[Prev]&#62; : never : never : never &#125;
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# FilterValue
**FilterValue**: [OperatorMap](../translation.OperatorMap/page.mdx)&#60;[FilterValue2](../translation.FilterValue2/page.mdx)&#60;T&#62;&#62; \| [FilterValue2](../translation.FilterValue2/page.mdx)&#60;T&#62; \| [FilterValue2](../translation.FilterValue2/page.mdx)&#60;T&#62;[] \| `null`
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# FilterValue2
**FilterValue2**: T \| [ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62; \| [Primary](../translation.Primary/page.mdx)&#60;T&#62;
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# FindConfigOrder
**FindConfigOrder**: `object`
Temporary type fixing to allow any level of orders until we get to properly clean all the types
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# JoinerRelationship
**JoinerRelationship**: `Object`
<TypeList types={[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"entity","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="JoinerRelationship"/>
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# LinkModulesExtraFields
**LinkModulesExtraFields**: `Record<string, object>`
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# Message
**Message**: [Event](../translation.Event/page.mdx)&#60;TData&#62; & `object`
The details of an event to emit.
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# ModuleJoinerConfig
**ModuleJoinerConfig**: Omit&#60;[JoinerServiceConfig](../../interfaces/translation.JoinerServiceConfig/page.mdx), "serviceName" \| "primaryKeys" \| "relationships" \| "extends"&#62; & `object`
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# ModuleJoinerRelationship
**ModuleJoinerRelationship**: [JoinerRelationship](../translation.JoinerRelationship/page.mdx) & `object`
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# OperatorMap
**OperatorMap**: `Object`
<TypeList types={[{"name":"$and","type":"[Query](../translation.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../translation.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../translation.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../translation.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="OperatorMap"/>
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# PrevLimit
**PrevLimit**: [`never`, `0`, `1`, `2`]
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# Primary
**Primary**: T extends `object` ? [ReadonlyPrimary](../translation.ReadonlyPrimary/page.mdx)&#60;PK&#62; : T extends `object` ? [ReadonlyPrimary](../translation.ReadonlyPrimary/page.mdx)&#60;PK&#62; \| `string` : T extends `object` ? [ReadonlyPrimary](../translation.ReadonlyPrimary/page.mdx)&#60;PK&#62; : T extends `object` ? [ReadonlyPrimary](../translation.ReadonlyPrimary/page.mdx)&#60;PK&#62; : `never`
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# Query
**Query**: T extends `object` ? T extends [Scalar](../translation.Scalar/page.mdx) ? `never` : [FilterQuery](../translation.FilterQuery/page.mdx)&#60;T&#62; : [FilterValue](../translation.FilterValue/page.mdx)&#60;T&#62;
@@ -0,0 +1,11 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# RawMessageFormat
**RawMessageFormat**: `Object`
<TypeList types={[{"name":"eventName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"TData","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"source","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"Pick&#60;[Context](../../interfaces/translation.Context/page.mdx), \"eventGroupId\"&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"options","type":"`Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="RawMessageFormat"/>
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# ReadonlyPrimary
**ReadonlyPrimary**: T extends `any`[] ? Readonly&#60;T&#62; : T
@@ -0,0 +1,9 @@
---
displayed_sidebar: translationReference
---
import { TypeList } from "docs-ui"
# Scalar
**Scalar**: `boolean` \| `number` \| `string` \| `bigint` \| `symbol` \| `Date` \| `RegExp` \| `Buffer` \| `object`
Loaded 100 of 133 files, more files were not shown because too many files have changed in this diff. Show more