Twitter 预览表使用 ActivityViewController 在 iOS 6 上以英语而不是语言设备显示 [英] Twitter preview sheet appears in English instead of language device on iOS 6 using ActivityViewController

查看:20
本文介绍了Twitter 预览表使用 ActivityViewController 在 iOS 6 上以英语而不是语言设备显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用新的 ActivityViewController 为用户提供在 Facebook 或 Twitter 中分享消息的可能性.我已经更改了 excludeActivityTypes 属性,以便在 ActivityViewController 上仅显示 Facebook 和 Twitter 按钮.在activityItems 数组中,我只有一个带有要共享的文本的NSString.

I'm using the new ActivityViewController to give the user the possibility to share a message in Facebook or Twitter. I've changed the excludedActivityTypes property in order to show only the Facebook and Twitter buttons on the ActivityViewController. In the activityItems array I have only a NSString with the text to share.

代码如下:

NSString *text = @"Text to share";

NSArray *activityItems = [NSArray arrayWithObjects:text, nil];

UIActivityViewController *avc = [[UIActivityViewController alloc] initWithActivityItems: activityItems applicationActivities:nil];

// Indicamos los servicios estándar que no queremos mostrar
NSArray *excludedActivityTypes = [NSArray arrayWithObjects:UIActivityTypePostToWeibo,  UIActivityTypeMessage, UIActivityTypeMail, UIActivityTypePrint, UIActivityTypeCopyToPasteboard, UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll, nil];

avc.excludedActivityTypes = excludedActivityTypes;

[self presentViewController:avc animated:YES completion:nil];

设备以西班牙语配置.

所以,当我选择在 Facebook 中分享时,预览表显示为西班牙语(正常),但是当我选择 twitters 时,推特预览表显示为英文...这不是很重要,但对用户来说不是很漂亮.此外,我担心这可能是更重要的事情的征兆.

So, when I choose share in Facebook the preview sheet appears in Spanish (normal), but when I choose twitters the twitter preview sheet appears in English... It's not very important, but not very pretty for the user. Also, it worries me that it can be a symptom of something more important.

你知道为什么推特预览表用英文显示吗?

Do you know why is the twitter preview sheet appearing in English??

更新:ActivityViewIndicator的取消按钮也出现了英文

UPDATE: The cancel button of the ActivityViewIndicator is also appearing in English

非常感谢!

卡洛斯

推荐答案

最后我发现问题与本地化有关.为了以任何语言查看所有系统视图控制器,您必须确保已添加 .lproj 目录或在 info.plist 中添加包含您需要的所有语言的本地化键.

Finally I saw the problem was related the localizations. In order to see all the system viewcontrollers in any language you must ensure you have added either an .lproj directory or add in the info.plist the localizations key with all the languages you need.

当我在 info.plist 中将西班牙语添加到 localizations 键时,推特表开始以西班牙语显示.

At the moment I added spanish to localizations key in the info.plist the twitter sheet began to appear in spanish.

这篇关于Twitter 预览表使用 ActivityViewController 在 iOS 6 上以英语而不是语言设备显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆