Android中的加泰罗尼亚语和巴斯克语资源 [英] Catalan and Basque resources in Android

查看:118
本文介绍了Android中的加泰罗尼亚语和巴斯克语资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您要在Android中添加特定于语言环境的资源时,必须将语言的小写ISO-3166-1代码添加到资源文件夹的名称中.到目前为止一切顺利.

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?

编辑:使用应用中的自定义语言选择器,即使语言不在设备的设置"菜单中,您也可以提供对语言的支持.我已经在GitHub上提供了用于此的库: https://github.com/delight-im/Android-Languages

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

我不知道Android是否支持所有ISO代码以及这些次要"语言是否会全部显示.如果无法使用这些语言提供Android,则设备甚至都不会将该语言识别为默认语言,而仅将es用作西班牙语.

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.

有人可以帮忙吗?

推荐答案

许多设备出厂时在设置菜单中的语言选择有限,但是实际上可以使用诸如

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.

通过在LocaleSwitch中添加自定义语言环境,然后添加资源文件夹以查看系统是否自动从该文件夹中加载资源,来测试Basque是否受支持应该很容易.

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.

最后,加泰罗尼亚语的姜饼支持"可能仅引用自2.3起的android.R值,尽管在

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.

这篇关于Android中的加泰罗尼亚语和巴斯克语资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆