Reputation: 4830
this question may be a simple one but I just need it clarified. I have worked with localisation in Android with the values-sv, values-fi style before and it works perfectly. I've also been working with platform specific valus like this values-v11, values-v14 and also that has worked very good. Now I need to combine them, I need multilanguage support and different values depending on platform. And I can't get it to work, I've tried this style values-v11-sv and so on.
The reason why I need to do this is because a want to have a different style on my theme depending on platform and that will be configured in a styles.xml file. One other question I also have is if I need to have all strings.xml files in all version and language maps, or if it just needs to be in the values map with the lowest platform number, I mean the strings should be the same on all platforms.
What's the proper way of implementing this.
Thank You!
Upvotes: 1
Views: 366
Reputation: 43778
You can put your string.xml
files into the language specific directories like values-fi
and the styles.xml
files into the version specific directories like values-v11
.
The strings will then be the same on all API versions and the styles will be the same on all languages.
The approach with version and style specific directories like values-fi-v11
(note that the language has to be specified first) is only necessary if you want the resource to be only applicable to this specific version and language combination.
See the documentation for full details.
Upvotes: 1