How to display an app in the user's selected admin language?

Topic summary

A developer is building a bilingual Shopify app and needs to detect the user’s admin language preference to display the app accordingly.

Initial Approaches Discussed:

  • Using the /admin/shop.json endpoint or GraphQL API to retrieve primary_locale, though this requires an extra HTTP request and the read_locales scope
  • The primary_locale field returns the store’s default language (from Settings > Languages), not the individual admin user’s selected language

Client-Side Solutions:

  • Early suggestions mentioned useShopifyUserLocale from @shopify/app-bridge-react, but this hook doesn’t exist in version 3.7.2
  • One user confirmed useLocale works in version 3.7.4
  • For newer app-bridge versions, use useAppBridge() and access the locale via appBridge.config.locale

Server-Side Solution:

  • Embedded apps automatically receive the admin user’s chosen locale as a locale request parameter in Shopify’s GET requests to the app (found in official documentation)
  • A GraphQL query for shop.accountOwner.locale exists but requires Shopify Plus/Advanced or finance embedded apps

Additional Resource:

  • Olelo Honua was suggested as a free, open-source tool for translating locale files into multiple languages
Summarized with AI on October 30. AI used: claude-sonnet-4-5-20250929.

Hello @JB27 ,

I’m using @Shopify/app-bridge-react@3.7.4 version and @PageFly-Kate solution worked (on a different scenario, but yet using the same lib) changing from useShopifyUserLocale to useLocale.

Hope that help you. And thanks for your response @PageFly-Kate . :slightly_smiling_face:

2 Likes