---
title: >-
  Storefront API @inContext directive supports languages - Shopify developer
  changelog
description: >-
  Shopify’s developer changelog documents all changes to Shopify’s platform.
  Find the latest news and learn about new platform opportunities.
source_url:
  html: >-
    https://shopify.dev/changelog/storefront-api-incontext-directive-supports-languages
  md: >-
    https://shopify.dev/changelog/storefront-api-incontext-directive-supports-languages.md
metadata:
  effectiveApiVersion: 2022-04
  affectedApi: []
  primaryTag:
    displayName: API
    handle: api
  secondaryTag:
    displayName: Update
    handle: update
  indicatesActionRequired: false
  createdAt: '2022-03-04T16:04:54-05:00'
  postedAt: '2022-04-01T00:00:00-04:00'
  updatedAt: '2024-12-13T17:24:33-05:00'
  effectiveAt: '2022-04-01T00:00:00-04:00'
---

April 1, 2022

Tags:

* API
* 2022-04

# Storefront API @inContext directive supports languages

As of version 2022-04, the `@inContext` directive in the Storefront API accepts a `language` argument in addition to `country`. If the requested language is active for the given country, as configured within the shop's Market settings, then the query will return translated values.

The list of available languages can be accessed with this query:

```graphql
query Localization @inContext(country: CA, language: FR) {
  localization {
    # for the current country
    availableLanguages {
      isoCode
      endonymName
    }
    # and for non-current countries
    availableCountries {
      isoCode
      name
      availableLanguages {
        isoCode
        endonymName
      }
    }
  }
}
```

If an unsupported language or country is requested via `@inContext`, the response will fall back to supported values. In all cases, the actual country and language context will be returned as a response extension.

```json
{
  "data": {
    "productByHandle": {
      "title": "Cat bed",
      "variants": {
        "edges": [
          {
            "node": {
              "priceV2": {
                "amount": "100.0",
                "currencyCode": "CAD"
              }
            }
          }
        ]
      }
    }
  },
  "extensions": {
    "context": {
      "country": "CA",
      "language": "EN"
    }
  }
}
```

Learn more about [supporting multiple languages on storefronts](https://shopify.dev/api/examples/multiple-languages).
