The top level resources are created for a specific package during an application initialization. resources from Application.getResources.Basically, there are three kinds of resources you should be worried about: Technically, to get localized data one should use Resources with the desired Locale set in their Configuration. Make sure that you are already familiar with the following concepts: Resources, Configuration, and Locale. We don’t want to fall into the same trap, right? That’s why I want to go step by step to a final solution. As a result, when this functionality gets broken, developers can’t easily fix it due to the messy API and lots of deprecated things. There are a ton of articles and answers on Stack Overflow but they usually lack enough of explanation. Such behavior is enough for common applications, so just make sure you have strict reasons to change it before proceeding further. The resource framework automatically selects the resources that best match the device. The goal of this post is to gather all tips and address all pitfalls while implementing this functionality.Ĭhanging the language on Android at runtime was never officially encouraged or documented. The topic is old as the hills, but still is being actively discussed among developers due to frequent API and behavior changes. There is a library called Lingver that implements the presented approach with just a few lined of code.