Locale is "es-US" in storefront, but "es" in API

Locale is "es-US" in storefront, but "es" in API

Alex666
Shopify Partner
9 0 2

Hello,

 

  We use the window.Shopify.locale information to choose the language of the strings in storefront.

  The problem is that the storefront response is different with the Shopify API response.

 

  The scenario to replicate the problem is this:

  1. set from Shopify Admin

    > Settings > Default Language --> "Spanish (United States)" 
  2. notice in the storefront window.Shopify.locale --> "es-US" (expected)
  3. notice in the API response --> "es-US" (expected)
  4. update from Shopify Admin > Settings > Default Language --> "Spanish" 
  5. notice in the storefront window.Shopify.locale --> "es-US" (not expected)
  6. notice in the API response --> "es" (expected)

  Anyone knows if this is intended? Are there other scenarios where we should expect this?

  See the image below for more details.

Screenshot 2022-05-11 at 19.18.30.png

 

 

Thanks,

Alex

Replies 0 (0)