Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Catalan and Basque resources in Android

When you want to add locale-specific resources in Android, you have to add the lowercase ISO-3166-1 code of the language to the resource folder's name. So far so good.

Now I want to add Catalan and Basque strings to my application. According to the ISO list, I would have to add values-ca and values-eu. But will that work, actually?

Edit: With a custom language chooser in your app, you can provide support for languages even when they're not in the device's settings menu. I've made the library that I use for this available on GitHub: https://github.com/delight-im/Android-Languages

I don't know if Android supports all ISO codes and if these "minor" languages will be displayed at all. If Android is not available in these languages, perhaps the device will not even recognize this language as its default locale and just use es for Spanish.

Can someone help?

like image 559
caw Avatar asked Dec 06 '12 01:12

caw


3 Answers

We can now create our "values-eu-rES" folder and have our app in Basque, Android Lollipop has made it.

like image 91
Jon Zangitu Avatar answered Sep 22 '22 07:09

Jon Zangitu


Many devices ship with a limited selection of languages in the settings menu, but can actually be set to any system locale using an app such as LocaleSwitch.

It should be pretty easy to test whether Basque is supported by adding a custom locale in LocaleSwitch and then adding the resource folder to see if the system loads the resources from this folder automatically.

Finally, Gingerbread 'support' for Catalan may only reference the inclusion of android.R values since 2.3, though I can't see them in the framework repository.

like image 6
David Snabel-Caunt Avatar answered Nov 14 '22 12:11

David Snabel-Caunt


Actually not all languages are documented at Android docs and many brands did your custom version of Android which may change its list, but be sure that if a device has Catalan and/or Basque suports it will use ISO standard, and the values will got rigth as it is converted with string comparision.

Maybe it would be a good choice to put a handed changer if you got that most devices do not have this support on your tests.

like image 1
Pozzo Apps Avatar answered Nov 14 '22 11:11

Pozzo Apps