I would like to display currency rate based on user’s locale. Basically whenever user comes to a store then user locale should be auto detect and based on that the currency should be change (without displaying dropdown). Is that anything we can achieve in hydrogen storefront?
Probably, the createHydrogenContext function is provided so that the same country context is used for all storefront-api queries used on the shop.
If you created a project with npm create @shopify/hydrogen@latest, createHydrogenContext is used in the app/lib/context.ts file, with i18n as an argument.
Changing the value of this i18n argument will also change the display currency.
Therefore, I think you can achieve your goal by passing the country context obtained from the customer IP address to this argument.
However, I’m not absolutely confident that this is correct, so I would like to hear the correct answer from the Shopify team as well.