NSAlert支持从右到左的语言(反向布局) [英] NSAlert for right to left languages (reversed layout)

查看:112
本文介绍了NSAlert支持从右到左的语言(反向布局)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为从右到左的语言(如阿拉伯语和希伯来语)创建本地化的NSAlert.

I want to create localized NSAlert for right to left language like Arabic and Hebrew.

如何反转布局,以使图标位于右侧,文本字段位于左侧,按钮也从警报的左侧开始?

How can I reverse the layout so that Icon is on the right, TextField on the left, and also buttons start from the left side of the alert?

我似乎在任何地方都找不到合适的答案.

I can't seem to find the proper answer anywhere.

谢谢, N

推荐答案

Apple的人机接口指南对订购和订购有一定的严格要求.放置物品.例如,在此适当放置按钮"部分中的 HIG文档,最可能被触摸的按钮通常位于右侧.

Apple has a Human Interface Guidelines that are somewhat strict about the ordering & placement of things. For example, in the "Place buttons appropriately" section of this HIG documentation, buttons most likely to be touched usually go on the right.

如果您觉得NSAlert行为不合适,重新安排事情的最简单方法是实现自己的自定义NSView,使其看起来像NSAlert.但是,如果Apple尚未更改从右到左语言的顺序,那么可以肯定地说,您的大多数阿拉伯语和汉化语言都是正确的.希伯来语客户期望将其按钮放置在所有其他应用程序将放置其按钮的位置.也就是说,最有可能被触摸的按钮应该仍然在右下角.

If NSAlert behavior doesn't look right to you, the easiest way to rearrange things is to implement your own NSView customized to look like a NSAlert. But if Apple hasn't changed the order of things for Right-to-Left languages, then it's a pretty safe bet that most of your Arabic & Hebrew customers are going to be expecting their buttons to be placed in the same place where all other apps are going to have their buttons placed. That is, the button that's most likely to be touched should still be in the bottom right.

这篇关于NSAlert支持从右到左的语言(反向布局)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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