How we can change the languages as per selection done from the language menu.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In your res folder, you should have a folder called values. Inside that folder, place a strings.xml file.
The strings.xml files should contain something like this
If you want to support other languages, just create additional values folders inside res, also containing a string.xml file, containing the translations.
So if you want to support Dutch for example, create a strings.xml in a values-nl folder, containing this :
The translations will be automatically picked up by Android when the user switches languages. If no translations can be found for the given language (ex: the nonTranslatedText string), it will default to the ones found in res/values/strings.xml.
You can refer to these strings in layouts like this :
Or in java objects like this :