AppCompatDelegate.setApplicationLocales doesn't work with TxContextWrappingDelegate

Hi, I’m working on an Android project using Transifex Native (com.transifex.txnative:txsdk:1.2.1) and looking to support per-app languages (各应用语言偏好设定  |  Android 开发者  |  Android Developers) but have run into an issue.

The app supports Marshmallow (Android 6.0, SDK 23) so uses the backwards compatible AppCompatDelegate.setApplicationLocales(). This seems doesn’t work when using TxContextWrappingDelegate (or TxBaseAppCompactActivity).

For now, if I override MainActivity.getDelegate() to return TxContextWrappingDelegate(super.getDelegate())) then per-app languages don’t work. If getDelegate() isn’t touched and returns super.getDelegate() then per-app languages work well but Transifex is unusable.

Using LocaleManager.setApplicationLocales() instead does work on Android 13+. However this isn’t recommended by Google and doesn’t work on Android <= 12.

Are there any known fixes to allow both Transifex and per-app languages to work?

Hello @Gwen_W ,

We recently had an upgrade in our SDK, Could you please upgrade and give a try ? Also, We have a READ ME file where you can find more detail information.

Please give it a try and let us know how it goes :slight_smile:
Best Regards