这是一个很好的问题。
在苹果看来,真正的问题是,他们这样做,NSLocalizedString倾向于支持“区域格式”还是“语言”设置?
我从来没有找到明确的答案,我只是让NSLocalizedString决定。
(纯FWIW,我认为按照“语言”设置。)
有可能下面的代码片段可以帮助你。
// to ("usually") get the preferred language FROM THE SET WHICH we supplied in bundle
// [[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0]
// to ("often") get the preferred language REGARDLESS OF what we supplied
// [ [NSBundle preferredLocalizationsFromArray:[NSLocale ISOCountryCodes]] objectAtIndex:0]
// to ("fairly reliably") get the user's chosen language setting...
// [ [NSLocale preferredLanguages] objectAtIndex:0]
它可能没有帮助,但我希望它有帮助。
感谢您的回复。 – pm08 2010-12-04 21:22:21