Localization

Handle localization, strings, and legal texts in your Android SDK.

The .withLocale(Locale("en")) method gives you the ability to switch between locales on initialization.

You can customize or localize the texts used within the SDK in Configurations → SDK customization → SDK text in the Dashboard.

For a complete list of supported locales, see this article.

Strings

In addition to the MSDK Translations tool and the .withLocale(Locale("en")), you can use the withConf builder method that allows you to define the strings locally.

val config = SNSInitConfig(
  email = "[email protected]",
  phone = "+1 234 567890",
  strings = mapOf(
    "sns_oops_network_title" to "Oops! Seems like the network is down.",
    "sns_oops_network_html" to "Please check your internet connection and try again.",
    "sns_oops_action_retry" to "Try again",
  )
)
snsSdkBuilder.withConf(config)

Note that the witLocale method does not affect these strings; thus, it is up to you to use the required localization.


Did this page help you?