Well since you want to change the values of the preferences. I don't think it can be done automatically by the API. You will have to write your own code to set the preference values.
You can store the language dependent preference values in values-xx
directories. For eg. strings, integers etc.
When someone changes the phone's language your Activity will restarted. You should use this as an opportunity to change the preference values in onCreate
. First, store the current language being used, so that it can be used to detect whether the language was changed. You can use the Locale
to do it (Locale.getDefalt()
)
Now, if you detect a language change, just get the values by using the Resources
object by calling getResources()
and change all the language dependent preference values.