File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ layout : post
3+ title : " Xcode 设置开发语言为简体中文"
4+ author : iosdevlog
5+ date : 2021-07-01 12:09:21 +0800
6+ description : " "
7+ cover-img : https://github.com/iOSDevLog/LocalizationsDemo/raw/main/Screenshots/Chinese.png
8+ category :
9+ tags : []
10+ ---
11+
12+ ## 开发语言
13+
14+ 在国际化时,如果大部分用户不是英语,我们就需要设置默认语言。
15+
16+ ` Demo.xcodeproj/project.pbxproj `
17+
18+ ``` diff
19+ compatibilityVersion = "Xcode 9.3";
20+ - developmentRegion = en;
21+ + developmentRegion = zh-Hans;
22+ hasScannedForEncodings = 0;
23+ ```
24+
25+ ![ developmentRegion] ( https://github.com/iOSDevLog/LocalizationsDemo/raw/main/Screenshots/developmentRegion.png )
26+
27+ ## App 名称
28+
29+ ` InfoPlist.strings `
30+
31+ ![ InfoPlist.strings] ( https://github.com/iOSDevLog/LocalizationsDemo/raw/main/Screenshots/InfoPlist.strings.png )
32+
33+ ``` c
34+ " CFBundleName" = " 本地化" ;
35+ ```
36+
37+ ## 字符串本地化
38+
39+ ` Localizable.strings `
40+
41+ ``` c
42+ " 选好了" = " Done" ;
43+ ```
44+
45+ ## 图片本地化
46+
47+ ![ Assets.xcassets] ( https://github.com/iOSDevLog/LocalizationsDemo/raw/main/Screenshots/Assets.xcassets.png )
48+
49+
50+ ## 演示
51+
52+ ![ Chinese] ( https://github.com/iOSDevLog/LocalizationsDemo/raw/main/Screenshots/Chinese.png )
53+ ![ English] ( https://github.com/iOSDevLog/LocalizationsDemo/raw/main/Screenshots/English.png )
54+
55+ ## GitHub
56+
57+ < https://github.com/iOSDevLog/LocalizationsDemo >
You can’t perform that action at this time.
0 commit comments