# locale=all 不能用于查询所有语言环境

> Source: https://strapi.nodejs.cn/cms/migration/v4-to-v5/breaking-changes/no-locale-all

🌐 `locale=all` can not be used to get all entries in all locales

在 Strapi 5 中，`locale=all` 参数不再检索所有本地化版本；相反，必须单独请求特定的语言值。

🌐 In Strapi 5, the `locale=all` parameter no longer retrieves all localized versions; instead, specific locale values must be requested individually.

在 Strapi 5 中，使用 `locale=all` 参数已无法获取内容类型的所有本地化版本。

🌐 In Strapi 5, it's no longer possible to get all localized versions of a content type with the `locale=all` parameter.

此页面是[重大更改数据库](/cms/migration/v4-to-v5/breaking-changes)的一部分，提供关于重大更改的信息以及从 Strapi v4 迁移到 Strapi 5 的附加说明。

🌐 This page is part of the [breaking changes database](/cms/migration/v4-to-v5/breaking-changes) and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.

- Is this breaking change affecting plugins? Yes
- Is this breaking change automatically handled by a codemod? No

## 重大变更描述 {#breaking-change-description}

🌐 Breaking change description

**在 Strapi v4 中**

用户可以通过向内容 API 调用传递 `locale=all` 参数来获取单一类型的所有区域设置。在集合类型上这是不可能的。

🌐 Users could get all of the locales of a single type by passing the `locale=all` parameter to Content API calls. This is not possible on collection types.

**在 Strapi 5 中**

现在不可能再同时获取所有语言环境的文档（集合类型或单一类型）。必须传入特定的语言环境值。

🌐 Getting documents (collection types or single types) in all locales at the same time is not possible anymore. A specific locale value must be passed.

## 迁移 {#migration}

🌐 Migration

本节重新组合了有关引入的重大更改的有用说明和程序。

🌐 This section regroups useful notes and procedures about the introduced breaking change.

### 注意 {#notes}

🌐 Notes

有关在 Strapi 5 中使用 `locale` 可以执行的操作的更多信息，请参阅 [REST API](/cms/api/rest/locale)、[GraphQL API](/cms/api/graphql#locale) 和 [文档服务 API](/cms/api/document-service/locale) 参考文档。

🌐 Additional information on what is possible to do with `locale` in Strapi 5 is available in the [REST API](/cms/api/rest/locale), [GraphQL API](/cms/api/graphql#locale), and [Document Service API](/cms/api/document-service/locale) reference documentations.

### 手动操作 {#manual-procedure}

🌐 Manual procedure

使用自定义代码发送带有 `locale=all` 参数的查询的用户应手动更新其代码，列出所有可用的语言环境，然后逐一请求这些语言环境的数据。

🌐 Users having custom code sending queries with the `locale=all` parameter should manually update their code to list all available locales then request data for each of these locales one by one.
