I'm in the process of translating an app. Looking at this, I can see that a lot of countries have several codes for language.
I tried making a folder named values-nb, for Norwegian Bokmål. I changed the locale on my phones to Norway. This worked on my Sony Ericson Xperia 8, but not on the Samsung Galaxy Tab.
I then tried renaming the folder to values-no. It now works on the galaxy tab, but not on the xperia. I create both folders, and it works. But then I have to put the same file in each folder!
What if someone chose Norwegian Nynorsk, would I have to create yet another folder so that they don't default to English but get the Norwegian text? values-nn?
I guess my question is this: How do I get this to work? Can I make all these folders and then make them reference the values-no? Please help :)
In order to localize the strings used in your application , make a new folder under res with name of values-local where local would be the replaced with the region. Once that folder is made, copy the strings. xmlfrom default folder to the folder you have created. And change its contents.
The applications that we use in Android devices can be specific to a particular language. That is where Localization comes in the role. Localization is a process that changes the string into various different languages based on user requirements. In this tutorial, we will implement it practically in our application.
You'll find this screen either in the System Settings app: Languages, or System Settings: System: Languages and input. The Language preference screen should contain one entry called “English (Europe)”. Click Add language and add a fallback language.
There's no way under the current search rules to just have a localization for a specific country and be able to search all languages. At least that's my understanding from reading the pages at http://developer.android.com/guide/topics/resources/localization.html You would need to create values-nn-rNO, values-nb-rNO, and values-no-rNO and have duplicate strings.xml entries.
I haven't tried this, but look into string aliases at http://developer.android.com/guide/topics/resources/providing-resources.html#AliasResources
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With