這是一個很好的問題。
在蘋果看來,真正的問題是,他們這樣做,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