我App中有三個Localization,分別是:
- 繁體中文
- 簡體中文
- 英文
使用者可以在這三個隨意切換,來顯示他想要的語言介面。
三年前已有實現過多國語言化的預設語言 (Default (Fallback) Language of Localization),不過那篇文章我是有寫code,這次只要調整專案中的Info.plist即可!
調整過後,我切換到日語(SIM字眼旁是日文),App介面語言是英文喔~
官方解釋關鍵的這個key:
CFBundleLocalizations (Array – iOS, OS X) identifies the localizations handled manually by your app. If your executable is unbundled or does not use the existing bundle localization mechanism, you can include this key to specify the localizations your app does handle.
Each entry in this property’s array is a string identifying the language name or ISO language designator of the supported localization. See “Language and Locale Designations” in Internationalization and Localization Guide in Internationalization Documentation for information on how to specify language designators.
意思就是說,若使用者選擇你App沒有設定的語言,就會預設為這key所設定的語言。
話說,App已上架,剛來了位W的朋友測試一下,才發現預設語言居然是中文!因為一開始開發時就是以中文為主,在沒有任何調整之下,預設就是中文囉~
參考:Set default localization of iOS app、多國語言化的預設語言 (Default (Fallback) Language of Localization)。
隨意留個言吧:)~