1 /**
2 * @oas [get] /admin/locales/{code}
3 * operationId: GetLocalesCode
4 * summary: Get a Locale
5 * x-sidebar-summary: Get Locale
6 * description: Retrieve a locale by its code. You can expand the locale's relations or select the fields that should be returned.
7 * x-authenticated: true
8 * parameters:
9 * - name: code
10 * in: path
11 * description: The locale's code in [BCP 47 format](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1).
12 * example: fr-FR
13 * required: true
14 * schema:
15 * type: string
16 * - name: fields
17 * in: query
18 * description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
19 * fields. Without prefix it will replace the entire default fields.
20 * required: false
21 * schema:
22 * type: string
23 * title: fields
24 * description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
25 * fields. Without prefix it will replace the entire default fields.
26 * externalDocs:
27 * url: "#select-fields-and-relations"
28 * security:
29 * - api_token: []
30 * - cookie_auth: []
31 * - jwt_token: []
32 * x-codeSamples:
33 * - lang: JavaScript
34 * label: JS SDK
35 * source: |-
36 * import Medusa from "@medusajs/js-sdk"
37 *
38 * export const sdk = new Medusa({
39 * baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
40 * debug: import.meta.env.DEV,
41 * auth: {
42 * type: "session",
43 * },
44 * })
45 *
46 * sdk.admin.locale.retrieve("en-US")
47 * .then(({ locale }) => {
48 * console.log(locale)
49 * })
50 * - lang: Shell
51 * label: cURL
52 * source: |-
53 * curl '{backend_url}/admin/locales/fr-FR' \
54 * -H 'Authorization: Bearer {access_token}'
55 * tags:
56 * - Locales
57 * responses:
58 * "200":
59 * description: OK
60 * content:
61 * application/json:
62 * schema:
63 * $ref: "#/components/schemas/AdminLocaleResponse"
64 * "400":
65 * $ref: "#/components/responses/400_error"
66 * "401":
67 * $ref: "#/components/responses/unauthorized"
68 * "404":
69 * $ref: "#/components/responses/not_found_error"
70 * "409":
71 * $ref: "#/components/responses/invalid_state_error"
72 * "422":
73 * $ref: "#/components/responses/invalid_request_error"
74 * "500":
75 * $ref: "#/components/responses/500_error"
76 * x-since: 2.12.3
77 * x-featureFlag: translation
78 *
79 */
80