I am making an app in which I want to implement internationalization.
I have created alternative resources like
res/values-fr/strings.xml
which Contains French text for all the strings, including title
Can anyone tell me what to do next…
thanks
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.
You should always have default strings in
res/values/strings.xml, because Android tries to use the most specific resource available. If you have for exampleres/values-fr/strings.xmlandres/values-de/strings.xmland the users phone is set to English, your app will crash because neitherdenorfrare applicable for English there are no fallback resources.After you have specified your default strings and any translations in their respective subfolders, you can use the strings by their qualifiers. For example
R.string.some_string. Android will then use the most appropriate translation that is available for the users current device language.All that and more is explained here: Localizing with Resources