开发语言

在国际化时,如果大部分用户不是英语,我们就需要设置默认语言。

Demo.xcodeproj/project.pbxproj

                        compatibilityVersion = "Xcode 9.3";
-                       developmentRegion = en;
+                       developmentRegion = zh-Hans;
                        hasScannedForEncodings = 0;

developmentRegion

App 名称

InfoPlist.strings

InfoPlist.strings

"CFBundleName" = "本地化";

字符串本地化

Localizable.strings

"选好了" = "Done";

图片本地化

Assets.xcassets

演示

Chinese English

GitHub

https://github.com/iOSDevLog/LocalizationsDemo