Localization
β οΈBeta Feature
RevenueCat Billing and the RevenueCat Web SDK are currently in beta.
β οΈBeta translations
Some supported translations may include minor issues during beta. We're working to validate these, and appreciate your input!Β Please contact us or open an issue in our github repo with any corrections or general feedback on translations).
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:
- Web (JS/TS)
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 code | Language name |
---|---|
ar | Arabic |
ca | Catalan |
zh_Hans | Chinese (Simplified) |
zh_Hant | Chinese (Traditional) |
hr | Croatian |
cs | Czech |
da | Danish |
nl | Dutch |
en | English |
fi | Finnish |
fr | French |
de | German |
el | Greek |
he | Hebrew |
hi | Hindi |
hu | Hungarian |
id | Indonesian |
it | Italian |
ja | Japanese |
ko | Korean |
ms | Malay |
no | Norwegian |
pl | Polish |
pt | Portuguese |
ro | Romanian |
ru | Russian |
sk | Slovak |
es | Spanish |
sv | Swedish |
th | Thai |
tr | Turkish |
uk | Ukrainian |
vi | Vietnamese |