Category tags in RefinementList - show correct count filtered by language

Hi everyone.

I am building a search for a headless WordPress page using the react-instantsearch-dom components. It is almost completely finished, but I have one little issue that is bothering me.

I have added a Configure component to my InstantSearch with a filter to only show search results in the current language (my page is in multiple languages).

                attributesToSnippet={["content", "content:80"]}

However, I also have a list of categories which my various articles a grouped by. I have implemented this using the RefinementList component:

            transformItems={(items: any) =>
              orderBy(items, ["label", "count"], ["asc", "desc"])

Everything works as expected with the small flaw that my category-labels are shown with the wrong number of articles in each category. It seems that all articles are included in every language. Is there any way to filter the hits in the labels by language?

If I access each item in the RefinementList I get an object with the following structure:

label: 'Awesome posts', value: Array(1), count: 13, isRefined: false

I have tried various things by looking at the documentation here: refinementList | InstantSearch.js | Algolia but I can’t seem to get the correct count filtered by language.