Assume an application that has some locale-based raw resources. But the resources are not "corrensponding" to each other - one locale has less resources than another one. Application stores it's state when closed.
So, user can launch the application in one locale, close it (app remembers its state), then user changes phone locale, and restores the application. App tries to retrieve raw resource, but fails, because some information in that raw resource is missing due to another locale.
The question is: how to store current locale when closing the application?
I know about java.util.Locale
, but how can I put Locale to the Bundle?
Can I rely on getLanguage()
?