2011-10-24 73 views

回答

5

你應該使用[NSLocale preferredLanguages],使用[[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLanguages"]如果你支持的Mac OS X 10.4或更早版本。

3

兩者都表示要返回相同的東西,第一個只是更方便。

Apple Documentation宣稱:[[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLanguages"]

返回數組包含用戶的首選順序AppleLanguages鍵關聯的語言。

Apple Documentation宣稱:[NSLocale preferredLanguages]

用戶的語言優先順序爲NSString對象的數組,

+1

哪一個應該用在不同的情況下? –

+0

如果這兩個返回零如果在我的情況下呢? – igraczech

相關問題