Question

I want add a settings for language to my app which is independent from system language.

I could manage to change language of anything but the launcher icon is still in system language.

Is it possible anyhow to change that icon language?

Metin

Was it helpful?

Solution

Let's say that you are supporting N languages with this dubious feature.

You will need N entries in your manifest for the launcher activity. Each of those N entries will need an android:label pointing to a string that represents what you want displayed when your app is configured for -such-and-so language. You would then use PackageManager and setComponentEnabledSetting() to disable the old activity and enable the new one.

It is conceivable that you could use one <activity> element and N <activity-alias> elements to achieve your objective, but I am uncertain as to whether you can enable and disable activity aliases.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top