Skip to main content

The locale attribute name is reserved in Strapi 5

In Strapi 5, the locale attribute name is reserved, and all custom fields also named locale should be renamed before migrating to prevent data loss.

This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.

Breaking change description

In Strapi v4

There is an edge case where Strapi v4 users could create an attribute called locale only if the content-type does not have i18n enabled.

In Strapi 5

i18n is enabled by default for all content types, and the locale name is reserved by Strapi's APIs.

Migration

Manual procedure

Rename any custom field called locale on your content-types before any migration to prevent data loss or other unexpected issues.