Skip to main content

Localization

⚠️Beta Feature

RevenueCat Billing and the RevenueCat Web SDK are currently in beta.

Overview

  • RevenueCat Billing supports localization for 33 languages in the Web SDK.
  • Localization affects the entire purchase flow, including the checkout form (excluding any possible secondary payment flows such as 3D Secure authentication).
  • Product names and descriptions are not localized, and will be shown in their original form (as defined in the RevenueCat Dashboard).
  • Prices configured through multi-currency support are now formatted following the selected locale in the purchase flow.

Beta limitations

Currently, the following limitations apply while RevenueCat Billing is in beta:

  • It is not possible to override any strings for the given languages.
  • It is not possible to specify the language used in Web Paywall Links (hosted purchase flow).
  • Some of the supported languages may have minor translation issues, and we're working to validate them (please contact us or open an issue in our github repo with any corrections or general feedback on translations).

How to use localization support in purchases-js

📘Web SDK version compatibility

Localization is supported in purchases-js version 0.14.0 and above.

When invoking purchase(), you can provide a selectedLocale or defaultLocale using the PurchaseParams interface:

const pkg = (await Purchases.getSharedInstance().getOfferings()).current?.availablePackages[0];
try{
const { customerInfo, redemptionInfo } = await Purchases.purchase({
rcPackage: pkg,
purchaseOption: option,
// specify spanish as selected locale
selectedLocale: "es"
});
} catch (e) {
// Something went wrong while purchasing
}

Supported languages

The following language codes can be specified as locales:

Language codeLanguage name
arArabic
caCatalan
zh_HansChinese (Simplified)
zh_HantChinese (Traditional)
hrCroatian
csCzech
daDanish
nlDutch
enEnglish
fiFinnish
frFrench
deGerman
elGreek
heHebrew
hiHindi
huHungarian
idIndonesian
itItalian
jaJapanese
koKorean
msMalay
noNorwegian
plPolish
ptPortuguese
roRomanian
ruRussian
skSlovak
esSpanish
svSwedish
thThai
trTurkish
ukUkrainian
viVietnamese