---
title: "Locales"
description: "Use locales for multilingual and regional content."
category: "concepts"
audience: developers
lastUpdated: "2025-11-06T01:07:50.000Z"
---

Prismic supports creating localized versions of your content for different languages and regions. Each locale uses a code like `en-us` or `fr-ca` to represent a specific language and region combination.

[Learn how content writers use locales](https://prismic.io/docs/localization.md)

See the [Next.js](https://prismic.io/docs/nextjs.md#internationalization), [Nuxt](https://prismic.io/docs/nuxt.md#internationalization), or [SvelteKit](https://prismic.io/docs/sveltekit.md#internationalization) guides for framework-specific examples.

# Fetch content from locales

Use the Prismic client's [`lang`](https://prismic.io/docs/technical-reference/prismicio-client/v7.md#query-parameters) query parameter to fetch from a specific locale:

```ts {3}
// Fetches all blog posts from the `en-ca` locale.
const blogPosts = await client.getAllByType("blog_post", {
  lang: "en-ca",
});
```

Use the `*` wildcard to fetch content from all locales:

```ts {3}
// Fetches all blog posts from all locales.
const page = await client.getAllByType("blog_post", {
  lang: "*",
});
```

By default, pages are fetched from your repository's master locale:

```ts
const client = createClient("example-prismic-repo");

// Fetches all blog posts from the master locale.
const blogPosts = await client.getAllByType("blog_post");
```

[Learn more about the `lang` query parameter](https://prismic.io/docs/technical-reference/prismicio-client/v7.md#query-parameters)

# Add locales to routes

You can add locales to page URLs by configuring your website's [route resolvers](https://prismic.io/docs/routes.md).

The following example route resolver adds a page's locale to the start of its URL via the `:lang` keyword. The `:lang` keyword is replaced with the page's locale.

```json /:lang/
{
  "type": "page",
  "path": "/:lang/:uid"
}
```

The above route resolver may output a URL like `/en-ca/my-first-post`.

The `:lang?` keyword (with a `?`) omits the locale if the page is from the master locale.

```json /:lang?/
{
  "type": "page",
  "path": "/:lang?/:uid"
}
```

If `en-ca` is the master locale, the previous `/en-ca/my-first-post` example URL would be `/my-first-post` instead.

[Learn more about routes](https://prismic.io/docs/routes.md)

# Locales in the API

The Content API provides a page's locale in its `lang` property:

```json {12}
{
  "id": "YCiUyRUAACQAxfZK",
  "uid": "my-first-post",
  "url": "/blog/my-first-post",
  "type": "blog_post",
  "href": "https://example-prismic-repo.cdn.prismic.io/api/v2/...",
  "tags": ["Tag 1", "Tag 2"],
  "first_publication_date": "2021-02-14T03:22:26+0000",
  "last_publication_date": "2022-07-09T00:36:18+0000",
  "slugs": ["my-first-post"],
  "linked_documents": [],
  "lang": "fr-fr",
  "alternate_languages": [],
  "data": {
    // ...
  }
}
```

A page's translated versions are listed in the page's `alternate_languages` property.

```json {5-11}
{
  "id": "YCiUyRUAACQAxfZK",
  "uid": "my-first-post",
  // ...
  "alternate_languages": [
    {
      "id": "XTb4mBAAACQAOfrg",
      "type": "homepage",
      "lang": "fr-fr"
    }
  ],
  "data": {
    // ...
  }
}
```
