Localization
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 through the MSDK Translations tool 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)
Map<String, String> strings = new HashMap<>();
strings.put("sns_oops_network_title", "Oops! Seems like the network is down.");
strings.put("sns_oops_network_html", "Please check your internet connection and try again.");
strings.put("sns_oops_action_retry", "Try again");
SNSInitConfig config = new SNSInitConfig("[email protected]", "+11231234567", strings);
SNSMobileSDK.SDK snsSdk = new SNSMobileSDK.Builder(requireActivity())
...
.withConf(config)
.build();
Note that the witLocale
method does not affect these strings, thus it's up to you to use the required localization.
Terms and conditions and Private policy
You can specify your Terms and Conditions and Privacy Policy by HTML or URL.
Use the following keys in MSDK Translations sns_tos_GTC_html
(Terms and Conditions) and sns_tos_PP_html
(Privacy Policy) to specify HTML, and sns_tos_GTC_url
(Terms and Conditions) and sns_tos_PP_url
(Privacy Policy) to load from URL.
Updated 27 days ago