Fetching entry in a specific locale: linked entries are retrieved in all locales

Hi all !

We have a website with soon multiple locales (fr-BE for now, soon nl-BE and then possibly more), so I’m running some experiments with the Content Delivery API, using the Field-level localization. It brings some questions.

Let’s say I want to fetch a specific Article entry in fr-BE locale. This entry has some linked entries, that are linked to my Article entry in a localized Similar Articles field. Where I have for example 4 linked similar articles in fr-BE, and 2 in nl-BE.

The way I fetch it, is by doing in a single call:

https://cdn.contentful.com/spaces/XXXXXXXX/entries?sys.id=7cJsfNIXSGdB1MN3W5Y&include=1&locale=fr-BE

It works fine, the correct Article entry is fetched in the desired locale, along with all its linked entries that are placed, as usual, in the includes.Entry array. However, this array contains all the linked entries, in all locales. So in my example, I end up with 6 similar articles in the includes.Entry array: the 2 linked entry in nl-BE are included, even if I didn’t query this locale.

It’s not a big issue (especially for a dummy example like this one) since I’m still able to use only the contents in the locale I was looking for from the main entry attributes, but I was wondering if this behaviour was normal, and if it was not possible to extend the locale query parameter to the linked items of a given entry. Or did I miss something ?

Thanks in advance for your thoughts on this :slight_smile:

Hi @Steevy90, unfortunately the locale filtering is not propagated to the included entries. However, I will file a feature request on your behalf :blush:

Hi @Alma, thanks a lot for your quick answer :slight_smile: Relieved to see that this is not something that I got wrong, and good to read it will be filed as a feature request !