gpt4 book ai didi

iphone - iPhone lproj 文件夹的区域设置代码

转载 作者:行者123 更新时间:2023-12-03 18:16:16 24 4
gpt4 key购买 nike

在哪里可以找到我的项目本地化文件夹的区域设置名称缩写列表? (例如 en 表示英语,fr 表示法语)。

我正在寻找德语、西类牙语和其他语言。

最佳答案

您可以将它们命名为English.lprojSpanish.lproj等。

“缩写名称”实际上是 IETF language tags (即 BCP 47 ),只不过您使用 pt_PT.lproj 而不是 pt-PT.lproj

<小时/>

实际的解释例程在https://github.com/apple/swift-corelibs-foundation/blob/master/CoreFoundation/PlugIn.subproj/CFBundle_Locale.c中,由 CFBundleGetLocalizationInfoForLocalization 函数确定。复制到这里:

| lproj identifiers              | L#  | C#  | Display name               |
|:-------------------------------|:----|:----|:---------------------------|
| en_US = en = English | 0 | 0 | English (United States) |
| en_GB | 0 | 2 | English (United Kingdom) |
| en_AU | 0 | 15 | English (Australia) |
| en_CA | 0 | 82 | English (Canada) |
| en_SG | 0 | 100 | English (Singapore) |
| en_IE | 0 | 108 | English (Ireland) |
| fr_FR = fr = French | 1 | 1 | French (France) |
| fr_CA | 1 | 11 | French (Canada) |
| fr_CH | 1 | 18 | French (Switzerland) |
| fr_BE | 1 | 98 | French (Belgium) |
| de_DE = de = German | 2 | 3 | German (Germany) |
| de_CH | 2 | 19 | German (Switzerland) |
| de_AT | 2 | 92 | German (Austria) |
| it_IT = it = Italian | 3 | 4 | Italian (Italy) |
| it_CH | 3 | 36 | Italian (Switzerland) |
| nl_NL = nl = Dutch | 4 | 5 | Dutch (Netherlands) |
| nl_BE | 34 | 6 | Dutch (Belgium) |
| sv_SE = sv = Swedish | 5 | 7 | Swedish (Sweden) |
| es_ES = es = Spanish | 6 | 8 | Spanish (Spain) |
| es_XL | 6 | 86 | Spanish (Latin America) |
| da_DK = da = Danish | 7 | 9 | Danish (Denmark) |
| pt_BR = pt = Portuguese | 8 | 71 | Portuguese (Brazil) |
| pt_PT | 8 | 10 | Portuguese (Portugal) |
| nb_NO = nb = no = Norwegian | 9 | 12 | Norwegian Bokmål (Norway) |
| nn_NO = nn = Nynorsk | 151 | 101 | Norwegian Nynorsk (Norway) |
| he_IL = he = Hebrew | 10 | 13 | Hebrew (Israel) |
| ja_JP = ja = Japanese | 11 | 14 | Japanese (Japan) |
| ar = Arabic | 12 | 16 | Arabic |
| fi_FI = fi = Finnish | 13 | 17 | Finnish (Finland) |
| el_GR = el = Greek | 14 | 20 | Greek (Greece) |
| el_CY | 14 | 23 | Greek (Cyprus) |
| is_IS = is = Icelandic | 15 | 21 | Icelandic (Iceland) |
| mt_MT = mt = Maltese | 16 | 22 | Maltese (Malta) |
| tr_TR = tr = Turkish | 17 | 24 | Turkish (Turkey) |
| hr_HR = hr = Croatian | 18 | 68 | Croatian (Croatia) |
| zh_TW = zh-Hant | 19 | 53 | Chinese (Taiwan) |
| zh_CN = zh = zh-Hans = Chinese | 33 | 52 | Chinese (China) |
| ur_PK = ur = Urdu | 20 | 34 | Urdu (Pakistan) |
| ur_IN | 20 | 96 | Urdu (India) |
| hi_IN = hi = Hindi | 21 | 33 | Hindi (India) |
| th_TH = th = Thai | 22 | 54 | Thai (Thailand) |
| ko_KR = ko = Korean | 23 | 51 | Korean (South Korea) |
| lt_LT = lt = Lithuanian | 24 | 41 | Lithuanian (Lithuania) |
| pl_PL = pl = Polish | 25 | 42 | Polish (Poland) |
| hu_HU = hu = Hungarian | 26 | 43 | Hungarian (Hungary) |
| et_EE = et = Estonian | 27 | 44 | Estonian (Estonia) |
| lv_LV = lv = Latvian | 28 | 45 | Latvian (Latvia) |
| se = Sami | 29 | 46 | Northern Sami |
| fo_FO = fo = Faroese | 30 | 47 | Faroese (Faroe Islands) |
| fa_IR = fa = Farsi | 31 | 48 | Persian (Iran) |
| ru_RU = ru = Russian | 32 | 49 | Russian (Russia) |
| ga_IE = ga = Irish | 35 | 50 | Irish (Ireland) |
| sq = Albanian | 36 | -1 | Albanian |
| ro_RO = ro = Romanian | 37 | 39 | Romanian (Romania) |
| cs_CZ = cs = Czech | 38 | 56 | Czech (Czech Republic) |
| sk_SK = sk = Slovak | 39 | 57 | Slovak (Slovakia) |
| sl_SI = sl = Slovenian | 40 | 66 | Slovenian (Slovenia) |
| yi = Yiddish | 41 | -1 | Yiddish |
| sr_CS = sr = Serbian | 42 | 65 | Serbian (Serbia) |
| mk_MK = mk = Macedonian | 43 | 67 | Macedonian (Macedonia) |
| bg_BG = bg = Bulgarian | 44 | 72 | Bulgarian (Bulgaria) |
| uk_UA = uk = Ukrainian | 45 | 62 | Ukrainian (Ukraine) |
| be_BY = be = Byelorussian | 46 | 61 | Belarusian (Belarus) |
| uz_UZ = uz = Uzbek | 47 | 99 | Uzbek (Uzbekistan) |
| kk = Kazakh | 48 | -1 | Kazakh |
| hy_AM = hy = Armenian | 51 | 84 | Armenian (Armenia) |
| ka_GE = ka = Georgian | 52 | 85 | Georgian (Georgia) |
| mo = Moldavian | 53 | -1 | Moldavian |
| ky = Kirghiz | 54 | -1 | Kyrgyz |
| tg = Tajiki | 55 | -1 | Tajik |
| tk = Turkmen | 56 | -1 | Turkmen |
| mn = Mongolian | 58 | -1 | Mongolian |
| ps = Pashto | 59 | -1 | Pashto |
| ku = Kurdish | 60 | -1 | Kurdish |
| ks = Kashmiri | 61 | -1 | Kashmiri |
| sd = Sindhi | 62 | -1 | Sindhi |
| bo = Tibetan | 63 | 105 | Tibetan |
| ne_NP = ne = Nepali | 64 | 106 | Nepali (Nepal) |
| sa = Sanskrit | 65 | -1 | Sanskrit |
| mr_IN = mr = Marathi | 66 | 104 | Marathi (India) |
| bn = Bengali | 67 | 60 | Bengali |
| as = Assamese | 68 | -1 | Assamese |
| gu_IN = gu = Gujarati | 69 | 94 | Gujarati (India) |
| pa = Punjabi | 70 | 95 | Punjabi |
| or = Oriya | 71 | -1 | Oriya |
| ml = Malayalam | 72 | -1 | Malayalam |
| kn = Kannada | 73 | -1 | Kannada |
| ta = Tamil | 74 | -1 | Tamil |
| te = Telugu | 75 | -1 | Telugu |
| si = Sinhalese | 76 | -1 | Sinhala |
| my = Burmese | 77 | -1 | Burmese |
| km = Khmer | 78 | -1 | Khmer |
| lo = Lao | 79 | -1 | Lao |
| vi_VN = vi = Vietnamese | 80 | 97 | Vietnamese (Vietnam) |
| id = Indonesian | 81 | -1 | Indonesian |
| tl = Tagalog | 82 | -1 | Tagalog |
| ms = Malay | 83 | -1 | Malay |
| am = Amharic | 85 | -1 | Amharic |
| ti = Tigrinya | 86 | -1 | Tigrinya |
| om = Oromo | 87 | -1 | Oromo |
| so = Somali | 88 | -1 | Somali |
| sw = Swahili | 89 | -1 | Swahili |
| rw = Kinyarwanda | 90 | -1 | Kinyarwanda |
| rn = Rundi | 91 | -1 | Rundi |
| Nyanja | 92 | -1 | Nyanja |
| mg = Malagasy | 93 | -1 | Malagasy |
| eo = Esperanto | 94 | 103 | Esperanto |
| cy = Welsh | 128 | 79 | Welsh |
| eu = Basque | 129 | -1 | Basque |
| ca_ES = ca = Catalan | 130 | 73 | Catalan (Spain) |
| la = Latin | 131 | -1 | Latin |
| qu = Quechua | 132 | -1 | Quechua |
| gn = Guarani | 133 | -1 | Guarani |
| ay = Aymara | 134 | -1 | Aymara |
| tt = Tatar | 135 | -1 | Tatar |
| ug = Uighur | 136 | -1 | Uyghur |
| dz_BT = dz = Dzongkha | 137 | 83 | Dzongkha (Bhutan) |
| jv = Javanese | 138 | -1 | Javanese |
| su = Sundanese | 139 | -1 | Sundanese |
| gl = Galician | 140 | -1 | Galician |
| af_ZA = af = Afrikaans | 141 | 102 | Afrikaans (South Africa) |
| br = Breton | 142 | 77 | Breton |
| iu_CA = iu = Inuktitut | 143 | 78 | Inuktitut (Canada) |
| gd = Scottish | 144 | 75 | Scottish Gaelic |
| gv = Manx | 145 | 76 | Manx |
| to_TO = to = Tongan | 147 | 88 | Tongan (Tonga) |
| grc | 148 | 40 | Ancient Greek |
| kl = Greenlandic | 149 | 107 | Kalaallisut |
| az = Azerbaijani | 150 | -1 | Azerbaijani |

这里:

  • L# 是语言代码,C# 是国家/地区代码。如果两个标识符共享相同的语言和国家/地区代码,我认为它们是相同的。
  • 我只列出了源文件中出现的字符串。它还可以通过更复杂的 CFLocale 列表识别诸如 zh_HK繁体中文(两者具有与 zh_TW 相同的代码编号)之类的内容。
<小时/>

从 iOS 10.3.1 开始,Apple 实际上使用了以下 lproj 名称列表:

  • 丹麦语、荷兰语、英语、法语、德语、意大利语、日语、波兰语、葡萄牙语、俄语、西类牙语、瑞典语
  • ar、bo、ca、cs、da、de、el、en、es、fi、fr、he、hi、hr、hu、id、it、ja、ko、ms、nb、nl、no、pa , pl, pt, ro, ru, sk, sv, th, tr, uk, ur, vi, chr(注:chr = 切诺基)
  • en_AU、en_CA、en_CN、en_GB、en_ID、en_IN、en_JP、en_MY、en_NZ、en_SG
  • es_419、es_AR、es_CL、es_CO、es_CR、es_GT、es_MX、es_PA、es_PE、es_US
  • ar_SA、da_DK、de_AT、de_CH、fi_FI、fr_BE、fr_CA、fr_CH、he_IL、it_CH、ms_MY、nb_NO、nl_BE、nl_NL、pt_BR、pt_PT、ru_RU、sv_SE、th_TH、tr_TR、yue_CN、zh_CN、zh_HK、zh_TW

关于iphone - iPhone lproj 文件夹的区域设置代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3040677/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com