Skip to main content

Internationalization with Shopify Markets


Shopify Markets helps merchants expand their business to a global audience by creating shopping experiences in local languages and currencies.

Hydrogen provides patterns on top of React Router to set up internationalization (i18n) that leverages a merchant’s market configuration. It also makes locales available throughout the app and in Storefront API queries.



Anchor to Setup the default localeSetup the default locale

Before setting up your Hydrogen Storefront, make sure to set a default language and country code. This ensures that the correct language and currency are used throughout the app.

This guide shows you how to add or update your custom storefront's default language.


Anchor to Setup a multi-region and multilingual storefrontSetup a multi-region and multilingual storefront

Shopify recommends that storefronts with multiple regions and languages have separate URLs for each locale. This improves accessibility for search engines and screen readers.

Use one of the following methods to create different URLs for each region and language.

OptionURL examples
Localization scheme using URL pathshydrogen.shop/fr, hydrogen.shop/es
Localization scheme using domains and subdomainshydrogen.fr, hydrogen.es

The advantage of using the URL paths method is that you only need to set this up from the app and you don't need to setup any domain infrastructure.


Anchor to Create a country selectorCreate a country selector

Users will want to switch your Storefront to their preferred country. It is good user experience to provide a way for them to achieve this within your store.


Anchor to Localization detection using headers, cookies, or URL search paramsLocalization detection using headers, cookies, or URL search params

While it's possible to detect an approximation of the user's locale by reading the header, cookies or URL search params. Shopify only recommends this to improve the experience of the user.

A good example of detecting localization is to show a banner to asking the user if they want to switch country.

A bad example of localization detection is when the user gets automatically redirected.

Other drawbacks of this approach are that page caching ignores locale cookies, headers and URL search params. SEO bots tend to origin from the US, don't have cookies and will not change their accept-language headers.


Anchor to Developer tools and resourcesDeveloper tools and resources



Was this page helpful?