1 get:
2 operationId: GetLocales
3 summary: List Locales
4 description: >-
5 Retrieve the list of supported locales. You can use this list to allow
6 customers to select their preferred locale in your storefront.
7 externalDocs:
8 url: https://docs.medusajs.com/resources/storefront-development/localization
9 description: Learn how to serve localized content in your storefront.
10 x-authenticated: false
11 parameters:
12 - name: x-publishable-api-key
13 in: header
14 description: Publishable API Key created in the Medusa Admin.
15 required: true
16 schema:
17 type: string
18 externalDocs:
19 url: https://docs.medusajs.com/api/store#publishable-api-key
20 - name: x-medusa-locale
21 in: header
22 description: The locale in BCP 47 format to retrieve localized content.
23 required: false
24 schema:
25 type: string
26 example: en-US
27 externalDocs:
28 url: >-
29 https://docs.medusajs.com/resources/commerce-modules/translation/storefront
30 description: Learn more in the Serve Translations in Storefront guide.
31 - name: locale
32 in: query
33 description: The locale in BCP 47 format to retrieve localized content.
34 required: false
35 schema:
36 type: string
37 example: en-US
38 externalDocs:
39 url: >-
40 https://docs.medusajs.com/resources/commerce-modules/translation/storefront
41 description: Learn more in the Serve Translations in Storefront guide.
42 x-codeSamples:
43 - lang: JavaScript
44 label: JS SDK
45 source:
46 $ref: ../code_samples/JavaScript/store_locales/get.js
47 - lang: Shell
48 label: cURL
49 source:
50 $ref: ../code_samples/Shell/store_locales/get.sh
51 tags:
52 - Locales
53 responses:
54 '200':
55 description: OK
56 content:
57 application/json:
58 schema:
59 $ref: ../components/schemas/StoreLocaleListResponse.yaml
60 '400':
61 $ref: ../components/responses/400_error.yaml
62 '401':
63 $ref: ../components/responses/unauthorized.yaml
64 '404':
65 $ref: ../components/responses/not_found_error.yaml
66 '409':
67 $ref: ../components/responses/invalid_state_error.yaml
68 '422':
69 $ref: ../components/responses/invalid_request_error.yaml
70 '500':
71 $ref: ../components/responses/500_error.yaml
72 x-since: 2.12.3
73 x-featureFlag: translation