Locales API Routes

A locale is a language that content is translated into for customers to view in a storefront. Medusa installs locales by default. These API routes allow you to retrieve supported locales in the store.

GET /store/locales#

List Locales

Retrieve the list of supported locales. You can use this list to allow customers to select their preferred locale in your storefront.

Feature flag: This API route is only available when the translation feature flag is enabled. Set the MEDUSA_FF_TRANSLATION environment variable to true to enable it.

Authentication: none.

Header parameters

x-publishable-api-keystring
Publishable API Key created in the Medusa Admin.
x-medusa-localestringOptional
The locale in BCP 47 format to retrieve localized content.
Example: en-US

Query parameters

localestringOptional
The locale in BCP 47 format to retrieve localized content.
Example: en-US

Request examples

Responses

200 OK

localesobject[]
The list of supported locales in the store.

400, 401, 404, 409, 422, 500: an error response is returned.

Found a problem with this page?Report Issue
Edited Nov 14·Edit this page