Skip to main content

Localization

Shoplazza merchants run their stores in different languages. An app that greets a Chinese-speaking merchant with an English-only UI feels harder to trust and harder to use. This guide shows how to detect the merchant's language and localize your app.

Detect the merchant's language​

You don't need to ask the merchant — Shoplazza tells you:

  • Embedded apps: the session token payload includes a locale field with the language and region of the current user, for example zh-CN. Read it from the verified token on every request, so your app follows the user immediately when they switch languages.
  • Backend services: read the store's primary_locale from the Shop API when you need a language outside of a user session — for example when rendering emails or scheduled reports.

Translate your app UI​

Structure your app for translation from the start:

  • Keep UI strings in locale resource files (the standard mechanism of i18n libraries such as i18next or your framework's built-in support) instead of hardcoding them in components.
  • Select the locale from the session token's locale field, and fall back to a default language (typically English) for locales you don't support yet.
  • Don't translate merchant data — product titles, order notes, and other store content belong to the merchant and should be displayed as stored.
  • Format dates, times, numbers, and currency with locale-aware APIs such as Intl instead of hand-built formatting.

Localize your app listing​

The Shoplazza App Store supports listings in English and Chinese. Provide both: the listing is the first thing a merchant reads, and a listing in the merchant's own language converts better. Keep the two versions in sync when you update screenshots, feature lists, or pricing descriptions — see the app listing requirements.