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
The way I fetch it, is by doing in a single call:
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