本文介绍了Android将ES-R419本地化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在本地化我的应用程序,支持的语言/地区之一是Espanol-419. Android不支持命名约定values-es-r419,但确实接受values-en-rGB. 我应该用什么名字使它起作用?

I'm localizing my app and one of the language/region supported is Espanol-419. Android doesn't support the naming convention values-es-r419 but it does accept values-en-rGB. What name should I use to make it work?

推荐答案

我不知道r419的来源.我唯一想到的可能是LCID,但419是俄语的,或者是国家/地区代码,但是419没有任何内容.这是西班牙语的语言环境代码列表,也许您想要的代码在这里:

I don't know where r419 comes from. The only thing I could think that it would be is an LCID but 419 is for Russian, or a country code, but there's nothing for 419. Here are a list of locale codes for Spanish, perhaps the one you want is in here:

es-ar  Spanish - Argentina
es-bo  Spanish - Bolivia    
es-cl  Spanish - Chile
es-co  Spanish - Colombia
es-cr  Spanish - Costa Rica
es-do  Spanish - Dominican Republic
es-ec  Spanish - Ecuador
es-sv  Spanish - El Salvador
es-gt  Spanish - Guatemala
es-hn  Spanish - Honduras
es-mx  Spanish - Mexico
es-ni  Spanish - Nicaragua
es-pa  Spanish - Panama
es-py  Spanish - Paraguay
es-pe  Spanish - Peru
es-pr  Spanish - Puerto Rico
es-es  Spanish - Spain (Traditional)
es-uy  Spanish - Uruguay
es-ve  Spanish - Venezuela

参考文献:

  • Microsoft's LCID table
  • ISO 3166-1
  • ISO 3166-1 Numeric

更新:

因此,显然419来自 UN M.49标准,由 BCP 47 . Google的关于替代资源的文档说:

So apparently 419 is from the UN M.49 standard taken up by BCP 47 for the IETF language tag. Google's documentation on alternative resources says:

很明显(仅用"r"表示),您可以看到它们不是标准的IETF语言标记.不幸的是,我相信这也意味着您将找不到一个等效于419的合适的两个字母区域.您还可以检查官方ISO列表.它不在那儿,只有两个国家的字母标签.显然,这是很常见不支持3位数字的标签.

Clearly (by the "r" alone) you can see that these are not standard IETF language tags. Unfortunately, I believe this also means that you won't be able to find a suitable two letter region equivalent to 419. You can also check the official ISO list. It's not on there, there are only two letter tags for countries. Apparently it's very common not to support the 3-digit tags.

我能想到的唯一解决方案是为es提供默认设置,然后为es国家的细分提供更具体的设置.您可以为您认为与419匹配的每个区域(例如es-rAR)提供资源,但是从该列表来看,我认为做相反的事情并使用es为拉丁美洲西班牙语提供资源会更容易,然后为西班牙的es-rES提供资源.由于es-rESes更具体,因此应优先(如果语言环境匹配).

The only solution I can think of is to provide a default set for es and then a more specific set for a subdivision of es countries. You could provide resources for each region (like es-rAR) that you think matches up with 419, but looking at that list, I think it'd be easier to do the opposite and use es to provide resources for Latin American Spanish, and then provide resources for es-rES for Spain. As es-rES is more specific than es, it should take precedence (if the locale matches).

这篇关于Android将ES-R419本地化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 04:04