UIWebView 本地化
我正在开发多语言应用程序,并打算将“完成”按钮本地化。当用户通过多选单击下拉菜单(“选择”标签)时,此按钮会出现在 UIWebView 中:
默认情况下,这始终是英语。但是,如果您在 .plist 文件中将 CFBundleAllowMixedLocalizations 设置为 YES,您将能够以当前的 SYSTEM 语言获取它:
这里,DONE 是用中文写的,而 select 中的文本是阿拉伯文。这是因为当前的系统语言(即在“设置”中设置)是中文,但在应用程序内部我选择了阿拉伯语,因此应用程序使用带有阿拉伯字符串文件的阿拉伯语捆绑包。
我想知道是否有可能将“完成”按钮本地化为当前应用程序语言,而不是系统语言?
I'm developing multi languages application and intent to have DONE button localized. This button is appear in UIWebView when user clicked on dropdown ("select" tag) with multiselect:
By default, this is always in English. However, if you set CFBundleAllowMixedLocalizations to YES in .plist file, you will be able to get it in current SYSTEM language:
Here, DONE is written in Chinese, when text in select in Arabic. It is because current system languages (i.e. set in Settings) is Chinese, but inside app I selected Arabic so app is using Arabic bundle with Arabic strings file.
I wonder, is any possibility to localize "DONE" button to current Application's language, but not system language?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不要使用“应用程序的语言”。只需使用系统语言,就像所有其他应用程序一样。
我确信可以以某种方式实现它,但您只是采用了错误的本地化方法。
Don't use "Application's language". Simply use the system language, like all other applications do.
I'm sure it's possible to somehow achieve it, but you're simply taking the wrong approach to localization.