3

This one puzzles me since my first android project. Consider multi-language string resources with 'en' as the default:

res/values/strings.xml     <--- The default language 'en'
res/values-de/strings.xml  <--- de
res/values-fr/strings.xml  <--- fr
res/values-it/strings.xml  <--- it

With that folder structure the Android Market entry for this app shows language support for "default, german, french and italian only". Yes, english is missing in that list.

Is it possible to "include" the complete default strings resource from the "values" folder in an additional "values-en" folder. And yes, I don't want to maintain that file in that new folder because everything is declared in the default string resource already.

Many thanks in advance.

Harald

1 Answer 1

4

I don't quite understand where the problem is. Just create a values-en directory and copy'n paste the XMLs from your default directory to the new one.

If you just want to have a kind of symbolic link to that default values directory so that when you change something inside the default directory the files i the linked directory represent the same changes then you just go to File -> New -> Folder select where the new folder should be created (in your case the res directory) and then hit on Advanced >> and there select Link to alternate location (Linked Folder) then browse to the directory you want to link to (in your case the values directory) and your done.

Now whenever you change something inside the values directory all your changes apply to the new linked directory.

Sign up to request clarification or add additional context in comments.

2 Comments

Yes! A copy of the strings.xml was no option (duplicate maintenance neccessary). But I overlooked the Advanced button in both Folder and File creation dialogs. I manually created the folder values-en and created a linked file strings.xml pointing to the default folder. Very good solution. I know, these strings are now twice in the apk but I want customers to see the important language translations. Google should add a box where one can define in what language the default is. Thanks for your help.
Unfortunately, this didn't work for me - the link is created but after the instalation, I still see only default language (default is in english, than I have regular czech (cs) and the linked one is slovak (sk) - I see english, not czech (as I should). Any help?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.