Purchasely
3.4
Rechercher…
⌃K

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
  • Dutch
That means that every error message and UI element will automatically translated in the user device language (if matching).

Manually set the language

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.
Your language code must be ISO 639-1 or ISO 639-2.
Swift
Objective-C
Kotlin
Java
React Native
Cordova
Flutter
// 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');
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.

Override default localizations

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 overrided are in the following file with the default translations in English.
Localizable.strings
7KB
Binary
iOS Localizable.strings - English version