-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
适配多语言 #1462
Comments
我看下 |
3.6.6已修复... |
我分别在初始化前尝试,但是没有效果。另外我不是最新的类库= =,不是pod,之前更改了一些些,非常感谢!
|
感谢感谢!相册的部分title是取的系统语言,我切换微信英文,相册依旧是系统中文。那RTL翻转只能自己去修改一些镜像的问题吗?如一些些icon,选中icon,预览视频都被翻转 |
关于RTL,TZ做的事情很少,更多是系统做的,可以搜索下tz_isRightToLeftLayout,这是TZ关于RTL的判断和几处适配... |
感谢作者,我fork了一份,主要处理RTL视频翻转问题,以及back按钮需要翻转,https://github.com/sauchye/TZImagePickerController
|
@banchichen 谭老师下午好,在适配RTL出现一些疑问,最近将iOS设备切换到阿拉伯语言,点击相册列表图片进入图片预览界面
仔细查看了一下下,在RTL单独赋值了
https://github.com/sauchye/TZImagePickerController |
为了适配多语言 期望把这块修改一下
(void)setPreferredLanguage:(NSString *)preferredLanguage {
_preferredLanguage = preferredLanguage;
if (!preferredLanguage || !preferredLanguage.length) {
preferredLanguage = [NSLocale preferredLanguages].firstObject;
}
if ([preferredLanguage rangeOfString:@"zh-Hans"].location != NSNotFound) {
preferredLanguage = @"zh-Hans";
} else if ([preferredLanguage rangeOfString:@"zh-Hant"].location != NSNotFound) {
preferredLanguage = @"zh-Hant";
} else if ([preferredLanguage rangeOfString:@"vi"].location != NSNotFound) {
preferredLanguage = @"vi";
} else {
preferredLanguage = @"en";
}
_languageBundle = [NSBundle bundleWithPath:[[NSBundle tz_imagePickerBundle] pathForResource:preferredLanguage ofType:@"lproj"]];
}
The text was updated successfully, but these errors were encountered: