Storfront Api @inContext(language:EN) Doesn't Work

Storfront Api @inContext(language:EN) Doesn't Work

Rabie
Tourist
4 0 1

Hi guys,

 

I have a store with 2 languages Arabic(AR) as default and English(EN)

Screenshot 2022-09-14 at 11.54.15.png

Everything is configured and it works with a normal HTML version

 

But always returns the default Arabic language when using the Storefront API 2022-07 @inContext directive 

@inContext(language:EN)

 

curl --location --request POST 'test.myshopify.com/api/2022-07/graphql.json' \
--header 'Accept-Language: EN' \
--header 'X-Shopify-Storefront-Access-Token: xxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query @inContext(language:EN) {\n  product (id: \"gid://shopify/Product/7653570510997\") {\n    id\n    title\n    description\n  }\n}\n","variables":{}}'
{
    "data": {
        "product": {
            "id": "gid://shopify/Product/7653570510997",
            "title": "جل مقاوم للبكتيربا لتنظيف البشرة  تي بوري - 190 مل",
            "description": "غسول جل مضاد للبكتيريا للتطهير اليومي للبشرة المصابة بحب الشباب المعرضة لظهور البثور والدهنية المفرطة. يوصى بالمنتج للبشرة من جميع الأعمار. يحل محل الصابون التقليدي."
        }
    },
    "extensions": {
        "context": {
            "language": "EN"
        }
    }
}

 @kazuki-miyazato @pubron could you please help?

Replies 2 (2)

Rabie
Tourist
4 0 1

The issue was the Localization app https://apps.shopify.com/langshop?locale=de and once I switched to Shopify beta Localization app the https://apps.shopify.com/translate-and-adapt

dserjgft
Visitor
1 0 0

I also want to add this feature to my Shopify store. Can you guide me regarding this? I don't want to use any app or plugin due to site load speed.