Description
Summary
The current Strapi v4 documentation for the Internationalization (i18n) plugin only shows how to filter content using a single locale value via the REST API. However, testing reveals that using multiple locale parameters in a single request (e.g., /api/articles?locale=en-US&locale=es-ES) returns content from both locales. This suggests that an implicit OR filter is being applied, though this behavior is not documented.
Why is it needed?
This undocumented behavior could lead to confusion for developers who assume that only one locale filter is supported per request. Clarifying this in the official documentation will help users understand:
- Whether filtering by multiple locales is officially supported.
- If the OR logic is reliable and safe to use in production.
- If using multiple requests is the recommended approach when querying content in several locales.
Additionally, if this behavior is not intended or officially supported, it’s equally important to document that clearly. Developers may assume it’s a supported feature simply because it currently works, and unknowingly build functionality around it. If such behavior were changed or removed in a future release, it could cause unexpected breakages in production applications. Proper documentation will help prevent reliance on potentially unstable or unsupported patterns.
Suggested solution(s)
Update the i18n plugin documentation to explicitly state whether multiple locale parameters are supported and how they are interpreted by the REST API.
If the behavior is supported, include an example of a request with multiple locales and describe the expected logic (e.g., OR vs AND).
Related issue(s)/PR(s)
No response