Skip to content
Discussion options

You must be logged in to vote

Thanks for the reply, I've already tried this, but it doesn't return the user admin locale but the language set in settings > language. I've managed to find the user locale from:

import { createApp } from "@shopify/app-bridge";

const app = createApp(....);
const appState = await app.getState();
const locale = appState?.staffMember?.locale 

But It don't know if it's the right way to do so.

Yes, I just asked the team that maintains App Bridge and they've confirmed using the appState.staffMember.locale is the correct way to get the current admin user's locale 😺 Thank you for sharing, I didn't know about this!

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@JumBay
Comment options

Comment options

You must be logged in to vote
1 reply
@JumBay
Comment options

Answer selected by chloerice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants