Localization
The SDK displays some text directly to the user (error messages, restore or login button text, …). These texts are translated in 18 languages:
- English
- French
- German
- Spanish
- Portuguese
- Italian
- Czech
- Polish
- Greek
- Chinese (Simplifed and traditional)
- Japanese
- Russian
- Turkish
- Swedish
- Korean
- Indonesian
- Arab
That means that every error message and UI element will automatically translated in the user device language (if matching).
By default, Purchasely uses the device / app language set by the OS.
If your app has an internal language selector, you will want to set that language to your Paywalls. You can force the SDK to be working in a specific language by calling the following method.
Swift
Objective-C
Kotlin
Java
React Native
Cordova
Flutter
Unity
// Force language in french
let locale = Locale(identifier: "fr")
Purchasely.setLanguage(from: locale)
// Force language in french
NSLocale *locale = [NSLocale localeWithLocaleIdentifier: @"es"];
[Purchasely setLanguageFrom: locale];
// Force language to spanish
Purchasely.language = Locale("es")
// Force language to italian
Purchasely.language = Locale.ITALY
// Force language to spanish
Purchasely.setLanguage(new Locale("es"));
// Force language to italian
Purchasely.setLanguage(Locale.ITALY);
// Force language to spanish
Purchasely.setLanguage("es");
// Force language to spanish
Purchasely.setLanguage("es");
Purchasely.setLanguage('es');
private PurchaselyRuntime.Purchasely _purchasely;
_purchasely.SetLanguage("en");
If your paywall is not available in the language you have set, Purchasely will display text inside the paywall in the language of the paywall set in Purchasely console and not the language you have enforced for consistency.
If you want to change the tone of the messages, you can override our translations and set yours. To do so, you just need to set the key and value corresponding to the message you want to change in your own
Localizable.strings
file (iOS) or strings.xml
(Android) file.The keys that can be overriden are in the following files with the default translations in English.
Localizable (1).strings
8KB
Binary
iOS Localizable.strings - English version
strings (1).xml
10KB
Binary
Android strings - English version