File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 11Pod ::Spec . new do |s |
22 s . name = 'MJRefresh'
3- s . version = '3.1.5 '
3+ s . version = '3.1.6 '
44 s . summary = 'An easy way to use pull-to-refresh'
55 s . homepage = 'https://github.com/CoderMJLee/MJRefresh'
66 s . license = 'MIT'
Original file line number Diff line number Diff line change @@ -144,14 +144,18 @@ - (NSString *)localizedStringForKey:(NSString *)key withDefault:(NSString *)defa
144144 if (bundle == nil ) {
145145 // 获得设备的语言
146146 NSString *language = [NSLocale preferredLanguages ].firstObject ;
147- // 如果是iOS9以上,截取前面的语言标识
147+ // 如果是iOS9以上,去掉后面的设备购买地区比如zh-Hans-US和zh-Hans-CN后面的US和CN
148148 if ([UIDevice currentDevice ].systemVersion .floatValue >= 9.0 ) {
149149 NSRange range = [language rangeOfString: @" -" options: NSBackwardsSearch];
150150 if (range.location != NSNotFound ) {
151151 language = [language substringToIndex: range.location];
152152 }
153153 }
154154
155+ if ([language isEqualToString: @" zh" ]) { // zh-HK被去掉了-HK
156+ language = @" zh-Hant" ;
157+ }
158+
155159 if (language.length == 0 ) {
156160 language = @" zh-Hans" ;
157161 }
You can’t perform that action at this time.
0 commit comments