How can I translate new "Filter" titles ?

Binh
New Member
1 0 2

Hi Guy!

How can I translate the title of this new Filter, when I am currently using this variable {{ filter.label | escape }} and I can't find it in app.

Binh_0-1632732092376.png

Binh_1-1632732160152.png

 

Thanks.

evaldas_92
Excursionist
30 0 11

It appears that adding product options to collection filter does not use translated option names when they are available. It does not seem to matter if options are added to filter before or after those options are translated.

Here I have a 3 products with translated option names:

Store: evr-novicell-7.myshopify.com

{
  "data": {
    "products": {
      "edges": [
        {
          "node": {
            "id": "gid://shopify/Product/7124606877858",
            "options": [
              {
                "id": "gid://shopify/ProductOption/9208951373986",
                "name": "Option 1",
                "translations": [
                  {
                    "key": "name",
                    "value": "Option 1 in da"
                  }
                ]
              },
              {
                "id": "gid://shopify/ProductOption/9208962941090",
                "name": "Option 2",
                "translations": [
                  {
                    "key": "name",
                    "value": "Option 2 in da"
                  }
                ]
              }
            ]
          }
        },
        {
          "node": {
            "id": "gid://shopify/Product/7124615463074",
            "options": [
              {
                "id": "gid://shopify/ProductOption/9208962810018",
                "name": "Option 1",
                "translations": [
                  {
                    "key": "name",
                    "value": "Option 1 in da"
                  }
                ]
              },
              {
                "id": "gid://shopify/ProductOption/9208962842786",
                "name": "Option 2",
                "translations": [
                  {
                    "key": "name",
                    "value": "Option 2 in da"
                  }
                ]
              }
            ]
          }
        },
        {
          "node": {
            "id": "gid://shopify/Product/7124615495842",
            "options": [
              {
                "id": "gid://shopify/ProductOption/9208962875554",
                "name": "Option 1",
                "translations": [
                  {
                    "key": "name",
                    "value": "Option 1 in da"
                  }
                ]
              },
              {
                "id": "gid://shopify/ProductOption/9208962908322",
                "name": "Option 2",
                "translations": [
                  {
                    "key": "name",
                    "value": "Option 2 in da"
                  }
                ]
              }
            ]
          }
        }
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 11,
      "actualQueryCost": 11,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 989,
        "restoreRate": 50
      }
    }
  }
}

 

Then I set up collection filters:

evaldas_92_0-1632755051968.png

 

And open the front-end (Dawn 1.0.0) - filter option names are not translated:

evaldas_92_1-1632755099275.png

 

0 Likes