I’ve a question about how i can handle 2 different language string resources like .e.g
@string/buttontext_de and @string/buttontext_en related to ONE menu button?
I’ve one start button and i want to display the right string resource which user device language is set.
1) I’ve 2 directories, one “res\values” (its the default german values directory) and one “res\values-en” where i’ve put in the english text resource (in strings.xml)
2) Next step i’ve to set the localization code in my start activity?
3) How can i set code that my button text is choosing the right language string resource?
THX a lot for any help!
See the Localization Developer Guide. Just specify duplicate String resources in the appropriate folders, step back, and let the I18N magic happen. To test it, go into your Settings (Einstellungen) and change your system language preference.
Thanks to Bytebender for pointing out what I missed. Yes, you want to create these files and resources:
Inside
res/values-en/strings.xml:Inside
res/values-de/strings.xml:Then refer to it in your XML like this: