Localization

Retrieve localized entries

You can specify a locale for entries using the locale URI query parameter.

The locale parameter must be the code of a locale in the space you’re querying, or the wildcard value *. If you don’t specify a locale, the default locale of the space is used.

If there’s no content available for the requested locale the API will try the fallback locale of the requested locale.

For example you have the de-CH (Swiss German) locale and configure it to fallback to de-DE (German). When you request content for de-CH any missing field in that locale will be replace with its fallback value in de-DE (if they exist). For more information about locale fallbacks read the locale section of the CMA docs.

When you specify locale=*, field values are nested in an object with keys corresponding to each locale with a defined value. Instead of writing fields.productName when accessing the response data from your code, use fields.productName[localeCode].

If the result contains only a single locale, resources will include the property sys.locale indicating the locale of that object.

Learn more about locales in our Help Center.

Use the Get all entries of a Space endpoint, see example:

/spaces/yadj1kx9rmg0/environments/staging/entries/5KsDBWseXY6QegucYAoacS?access_token=fdb4e7a3102747a02ea69ebac5e282b9e44d28fb340f778a4f5e788625a61abe&locale=en-US

fields.productName is the only localized field in the product content type, so returns all other fields in the default locale.