Xcode .strings 文件似乎不支持阿拉伯文本
我创建了一个我希望可以本地化的应用程序。因此,我创建了一个 .strings 资源文件来保存我的菜单和警报消息文本等。当我说:
“MyStringKey”=“???”
时,阿拉伯字母在我键入时并列,因为 .string 文件以从左到右的格式定义其条目(即“a”=“b”),而阿拉伯单词是从右到左书写的。文件编码是UTF-8并不重要。文件中的文本方向无法更改为从右到左。或者说在我看来是这样。
如何在 .strings 文件中创建像上面这样的条目?谢谢。
I created an app that I envisioned being localizable. So, I created a .strings resource file to keep my menu and alert message text, etc. When the time came for me to say:
"MyStringKey" = "السلم"
the Arabic letters became juxtaposed as I was typing because a .string file defines its entries in a left-to-right format (i.e. "a" = "b") whereas Arabic words are written right-to-left. It does not matter that the file encoding is UTF-8. The text direction cannot change to right-to-left in the file. Or so it seems to me.
How do I create entries in a .strings file like the one above? Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这听起来像是编辑器的问题,而不是核心工具链中 .strings 文件支持的问题。因此,我会在另一个支持行内方向更改的编辑器中创建/编辑 .string 文件,并忽略 XCode 编辑器对其缺乏支持。
在 XCode 中打开该文件时,该文件看起来会错误..但这应该不重要。
This sounds like an issue with the editor, not an issue with the support of .strings files in the core toolchain. So I'd create/edit my .string file in another editor that does support change of direction within a line, and just ignore the XCode editors lack of support for it.
The file will look wrong when opened in XCode .. but that shouldn't matter.