Storefront API products filters value labels not obeying @inContext language directive

I have used the Translate & Adapt app and the Search & Discovery app to create a product filter with custom meta objects. The meta objects are translated however when I query them, the label value returns the wrong language. The label of the filter itself returns in the correct language.

Query:

query GetCollectionProductsByHandleFilteredSimple($filters: [ProductFilter!], $lang: LanguageCode, $handle: String!) @inContext(language: $lang) {
  collection(handle: $handle) {
    handle
    title
    products(first: 100, filters: $filters) {
      pageInfo {
        endCursor
      }
      filters {
        id
        label
        type
        values {
          id
          label
          count
          input
        }
      }
      edges {
        node {
          handle
          vendor
        }
      }
    }
  }
}

Below is an example of the return when using English as the language directive. As you can see the label of the filter itself is correct, however the value is not.

"filters": [
        	"id": "filter.p.m.custom.hair_type",
        	"label": "Hair Type",
        	"type": "LIST",
        	"values": [
        	{
        		"id": "filter.p.m.custom.hair_type.gid-shopify-metaobject-36387848514",
        		"label": "Dày",
        		"count": 1,
        		"input": "{\"productMetafield\":{\"namespace\":\"custom\",\"key\":\"hair_type\",\"value\":\"gid:\\/\\/shopify\\/Metaobject\\/36387848514\"}}"
        	}, ]

As you can see the value is translated in the translate app:

Is this a bug? Or am I doing something wrong?

Hi @HongAnh , we’ve reported this to Search & Discovery team, you’re correct that filter value labels are indeed not using @InContext language; they’re looking into it. Thanks for raising this.

1 Like

Thank you!