Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

中文环境下,系统相册名字显示成英文——去掉info.plist里Localization native development region的设置 #443

Closed
dushoupeng opened this issue May 2, 2017 · 8 comments

Comments

@dushoupeng
Copy link

No description provided.

@doubleJJJJ
Copy link

同问

@banchichen banchichen changed the title 请问国际化怎么弄?现在是中文环境,成了英文中文都有的洁面 请问国际化怎么弄?现在是中文环境,成了英文中文都有的界面 Jun 3, 2017
@shaolelng
Copy link

在 #import "NSBundle+TZImagePicker.h"
找到这个方法,+ (NSString *)tz_localizedStringForKey:(NSString *)key value:(NSString *)value {
static NSBundle *bundle = nil;
if (bundle == nil) {
NSString *language = [NSLocale preferredLanguages].firstObject;
if ([language rangeOfString:@"zh-Hans"].location != NSNotFound) {
language = @"zh-Hans";
} else {
language = @"en";
}
bundle = [NSBundle bundleWithPath:[[NSBundle tz_imagePickerBundle] pathForResource:language ofType:@"lproj"]];
}
NSString *value1 = [bundle localizedStringForKey:key value:value table:nil];
return value1;
}

在 if ([language rangeOfString:@"zh-Hans"].location != NSNotFound) {
language = @"zh-Hans";
} else {
language = @"en";
}
添加要修改的语言 判断。

在 TZImagePickerController.bundle 中添加带翻译 语言文件。

@shaolelng
Copy link

试试

@banchichen
Copy link
Owner

banchichen commented Jul 15, 2017

标题里提到的"英文中文都有的界面",如果系统语言设置的是中文,但出现了这样的情况:

  1. 刚打开照片选择器时,导航栏的返回按钮是英文,相册名字是英文。
  2. 相册列表页中,系统相册是英文,其他相册是中文

说明是应用的info.plist文件里,设置了Localization native development region且值不是China。

解决方式:

  1. 去掉Localization native development region的设置(应用内语言跟随系统语言)
  2. 将Localization native development region的值设置为China。

@banchichen banchichen changed the title 请问国际化怎么弄?现在是中文环境,成了英文中文都有的界面 请问国际化怎么弄?现在是中文环境,成了英文中文都有的界面——去掉info.plist里Localization native development region的设置 Jul 15, 2017
@banchichen banchichen changed the title 请问国际化怎么弄?现在是中文环境,成了英文中文都有的界面——去掉info.plist里Localization native development region的设置 中文环境下,系统相册名字显示成英文——去掉info.plist里Localization native development region的设置 Jul 15, 2017
@voludenuit
Copy link

如果修改语言设置没有作用,要看看导航栏的显示是否正常,如果导航栏显示偏大,看看启动界面使用图片的尺寸是不是不对

@linyuezang
Copy link

是否支持长按上传视频

@cxm1150806259
Copy link

image

添加下语言就OK了

@LassZhang
Copy link

PROJECT > Info > Localizations的Language列表中添加Chinese

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants