Leanplum / Leanplum-Android-SDK

Leanplum's integrated solution delivers meaningful engagement across messaging and the in-app experience.
https://www.leanplum.com
Apache License 2.0
46 stars 40 forks source link

Add `setLocale` method #478

Closed batadamnjanovic closed 2 years ago

batadamnjanovic commented 2 years ago

Introduce setLocale(locale: String) in order to set a custom locale string.

Problem with this approach is that setLocale(...) needs to be called before Leanplum.start(...) method.

hborisoff commented 2 years ago

Hi @batadamnjanovic, what is your idea in adding setter method, because you can easily change the device's language if you want to test locales?

batadamnjanovic commented 2 years ago

Hi @hborisoff, this is similar to Web: https://github.com/Leanplum/Leanplum-JavaScript-SDK/pull/140 and iOS: https://github.com/Leanplum/Leanplum-iOS-SDK/pull/467.

We have predefined language codes that we need to send with every event.

batadamnjanovic commented 2 years ago

Hi @hborisoff, thanks for the collaboration.

Do you maybe know when will be the next release if it's not a secret? It will mean a lot to us to organise some things in this sprint.

Thanks!

hborisoff commented 2 years ago

@batadamnjanovic Yesterday I was working on a release 5.8.2 containing a bug fix and included your change too.