> ## Documentation Index
> Fetch the complete documentation index at: https://docs.makeswift.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Locale

> Returns a locale by its ID or locale code.

export const ReadinessBadge = ({type}) => {
  const validTags = ["beta", "alpha", "experimental"];
  const tagText = type?.trim().toLowerCase();
  if (!tagText || !validTags.includes(tagText)) return null;
  useEffect(() => {
    const titleElement = document.querySelector("#page-title, .page-title, h1");
    if (!titleElement) return;
    if (titleElement.querySelector(".badge")) return;
    const badge = document.createElement("span");
    badge.className = `badge ${tagText}-badge`;
    badge.textContent = tagText;
    badge.style.transform = "translateY(-3px)";
    titleElement.appendChild(badge);
  }, []);
  return null;
};

<ReadinessBadge type="beta" />


## OpenAPI

````yaml GET /v2/locales/{localeIdOrCode}
openapi: 3.1.0
info:
  title: Makeswift API
  description: Documentation for the Makeswift public REST API.
  version: '1.0'
servers:
  - url: https://api.makeswift.com
    description: Production server
security:
  - Authentication: []
tags:
  - name: Authentication
    description: ''
  - name: Workspace
    description: ''
  - name: Workspace Member
    description: ''
  - name: Site
    description: ''
  - name: Locale
    description: ''
  - name: Route
    description: ''
  - name: Page
    description: ''
  - name: Webhook Management
    description: ''
paths:
  /v2/locales/{localeIdOrCode}:
    get:
      tags:
        - Locale
      summary: Get Locale
      description: Returns a locale by its ID or locale code.
      operationId: SiteLocaleController_getV2_v2
      parameters:
        - name: localeIdOrCode
          in: path
          description: The locale ID or locale code.
          required: true
          schema:
            type: string
        - name: siteId
          in: query
          description: >-
            The site ID required when using a locale code instead of a locale
            ID.
          required: false
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReadSiteLocaleV2ResponseBodyDto'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponseDto'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponseDto'
components:
  schemas:
    ReadSiteLocaleV2ResponseBodyDto:
      type: object
      properties:
        object:
          type: string
          example: locale
          enum:
            - locale
        id:
          description: The ID of the locale you are getting.
          type: string
          format: uuid
          nullable: true
        locale:
          description: >-
            We support the subset of locales specified with ISO 3166 that are
            composed of language and optionally a region.
          type: string
          examples:
            - en
            - es
            - fr-FR
            - ar-EG
            - ja-JP
        domain:
          description: The domain URL for domain-based localization.
          type: string
          format: uri
          example: https://hearthfurniture.com.mx
          nullable: true
        isDefault:
          description: >-
            The flag that indicates whether this locale is the default locale
            for the site.
          type: boolean
      required:
        - object
        - id
        - locale
        - domain
        - isDefault
    BadRequestResponseDto:
      type: object
      properties:
        object:
          type: string
          enum:
            - error
        code:
          type: string
          enum:
            - bad_request
        message:
          type: string
      required:
        - object
        - code
        - message
    ForbiddenResponseDto:
      type: object
      properties:
        object:
          type: string
          enum:
            - error
        code:
          type: string
          enum:
            - forbidden
        message:
          type: string
      required:
        - object
        - code
        - message
  securitySchemes:
    Authentication:
      type: apiKey
      in: header
      name: x-api-key
      description: |-
        API key authentication. Accepts either:
        - App API key (e.g. sk_eczMHVBY9fV6GYFhvs53qcnxq7yptlXL3ABKOZtn6dQ)
        - Site API key (UUID format, e.g. 550e8400-e29b-41d4-a716-446655440000)

````