Inversion-NL / Toon-Android

Toon Android app for rooted Toon devices
MIT License
2 stars 2 forks source link

Change language in settings #7

Closed Inversion-NL closed 4 years ago

Inversion-NL commented 5 years ago

Add an extra option in settings to change the app language.

RoadXY commented 4 years ago

I see a lot of trouble later on since not officially supported. I won't be implementing this, sorry.

https://proandroiddev.com/change-language-programmatically-at-runtime-on-android-5e6bc15c758

Changing the language on Android at runtime was never officially encouraged or documented. The resource framework automatically selects the resources that best match the device. Such behavior is enough for common applications, so just make sure you have strict reasons to change it before proceeding further.

https://stackoverflow.com/questions/2900023/change-app-language-programmatically-in-android

It's possible. You can set the locale. However, I would not recommend that. We've tried it at early stages, it's basically fighting the system. We have the same requirement for changing the language but decided to settle to the fact that UI should be same as phone UI. It was working via setting locale but was too buggy. And you have to set it every time you enter activity (each activity) from my experience. here is a code if you still need this (again, I don't recommend that)