Docs
Editor

Localization

How a screen's translations work and how your code picks the language to show.

Building this in the dashboard? See Variables and languages.

A screen holds its texts once per language in components_localizations, keyed by codes like en_US. One language is the default: it is the source for new texts and the fallback for any text a language has not translated. The default language's texts must be filled in to publish (see Validation). Your team adds languages and translations in the editor's Translations panel.

Pick the language in your code

The SDK does not detect the visitor's browser language. Pass it yourself, at startup or per call:

configure({ apiKey: 'pk_...', locale: 'vi_VN' });
// or
presentPaywall({ paywall: { placement: 'upgrade_button' }, locale: 'vi-VN', products });

vi-VN and vi_VN both work. The SDK uses an exact match first, then any language with the same first part (vi matches vi_VN), then the screen's default language. Prices in products are formatted for that language too. On the web (0.1.0), period words such as year stay in English; see Purchases.

Fonts in the catalog cover the Latin character set. Text in other scripts, such as Cyrillic, Greek or Japanese, draws with a fallback font. Check translated screens in the editor's Preview language menu.

The locale also feeds the Language audience condition. To show a different screen per language, see Placements.

On this page