As part of Shopify’s internationalization roadmap, Shopify will now include a merchant’s locale in certain responses that are accessible to partner applications allowing apps to localize their responses and provide a better experience for merchants worldwide.
This locale impacts how merchants and staff accounts interact with Shopify, but doesn’t change how their customers interact with their online store and other channels.
You should provide customer support for all the languages that your app supports.
This doc includes information on using the
locale param as well as best practices, tools, and resources for optimizing your localization efforts.
1. How users select their locale
Store staff accounts will be able to select their preferred language under their account information. This will determine which locale is passed through the API. Since each staff can choose their preferred language, each staff member may use an app for the same store in a different language.
Note also that languages aren’t tied to specific countries.
2. How Shopify sends the locale to apps
When using online access mode, Shopify will return the locale during the authentication callback. The associated_user now has a locale param.
Example access token response:
When using the Embedded App SDK, Shopify will return the locale in the request coming from admin. This allows apps to respond to requests in the proper language without requiring an online session.
Example request URL:
Some languages, such as Portuguese, require a region (pt-PR, pt-BR) to be meaningful. Other languages, such as English (en-US, en-UK), could very well use regionalities as well to better capture specific words or contexts that are unique to certain regions of the world. We encourage you to build your language functionalities with a resilient support mechanism given the potential future addition of regionalities.
5. App Store
At the time of this writing, and while this is under beta, no changes are to be expected from the App Store. In the near future, we’ll adapt the App Store to better serve international apps and help merchants pick apps that are relevant for their language and their country. For now, your app store listing should still always include an English description.
6. Additional resources
Pseudolocalization is a software testing method used for testing internationalization aspects of software. Instead of translating the text of the software into a foreign language, as in the process of localization, the textual elements of an application are replaced with an altered version of the original language, allowing you to preview the potential varying lengths of strings.
Shopify has published a rubygem that allows for easy pseudolocalization of your strings. Please see the following resources for details: Github: https://github.com/Shopify/pseudolocalization Rubygems: https://rubygems.org/gems/pseudolocalization