Android 翻译成阿拉伯语

发布于 2024-11-08 03:22:23 字数 293 浏览 0 评论 0 原文

我正在与一位阿拉伯语翻译人员合作,他正在将我的 strings.xml 从英语翻译为阿拉伯语。我知道只有 Honeycomb 或 Cyanogen ROM 支持阿拉伯语渲染,但这没关系。

我们的问题是文本不断翻转。似乎某些文本编辑器(如 Eclipse)公然不支持从右到左的文本。在某些情况下,当从 Microsoft Word 复制回 UTF-8 xml 文件时,文本不会逐个字符翻转,而是逐个单词翻转,或者句子的部分内容会重新排列。

例如,译者提供的行两端都有空格,我自然想清理它们。但这样做却颠倒了一些文字!

例如:

I am working with an Arabic translator who is translating my strings.xml from english to arabic. I realize that only Honeycomb or Cyanogen roms will support arabic rendering, but that is ok.

Our problem is that the text keeps getting flipped around. It seems that some text editors (like Eclipse) blatantly do not support right-to-left text. And in some cases, the text is not flipped character by character, but word by word, or parts of the sentence get rearranged ... when copying from Microsoft Word back into the UTF-8 xml file.

For example, the translator supplied lines with spaces on each end, and naturally I wanted to clean these up. But doing so flipped some of the text around!

For example:
إغلاق التطبيق

became:
التطبيقإغلاق

just by removing spaces around the edges.

Questions:

1. What editor should I be using?
2. Is it ok to mix english and Arabic on the same line (such as the App Name or other words that should not be translated) or is this fundamentally a no-no?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

花之痕靓丽 2024-11-15 03:22:23

我目前正在开发一个阿拉伯语/英语项目,并且我会说两种语言,因此我可以向您提供我的经验:)

问题 1 的回答:
任何支持 UTF8 的编辑器都可以。我现在同时使用 eclipse 和 notepad++。

要使用 UTF8 设置 Eclipse(由于某种原因,这不是默认值),请转到窗口菜单 -> >偏好->一般->然后将文本文件编码从默认(cp1252)更改为其他,并选择utf8,然后重新启动eclipse。

对于记事本++,请确保安装受支持的区域设置,包括阿拉伯语。绝缘期间不会检查它,您必须勾选该复选框才能启用该功能。

问题 2 的回答:
将阿拉伯语和英语单词混合在一个句子中绝对没问题。我发现一篇非常好的文章写在这里 http://www.w3。 org/International/tutorials/bidi-xhtml/

本文介绍了支持从右到左语言(包括阿拉伯语和希伯来语)的网站的设计概念,重点关注阿拉伯语,因为它是一种更复杂的语言,因为某些语言字母与其他字母有联系,但有些则没有。

尽管本文讨论的是网站设计,但它也大量讨论了阿拉伯语和英语应该如何混合。

I am currently working on an Arabic/English project, and I speek both languages, so I can provide you with my experience :)

Answer to Question 1:
Any editor that supports UTF8 will do. I am now using both eclipse and notepad++.

To setup eclipse with UTF8 (which is not the default for some reason), go to window menu -> preferences -> general -> workspace then change text file encoding from deault (cp1252) to other, and choose utf8, then restart eclipse.

For notepad++, ensure you install supported locales, including Arabic. It is not checked during instulation and you have to tick the checkbox to enable that feature.

Answer to Question 2:
It is absolutely fine to mix Arabic and English words together in a sentence. A very very good article I found about that is written here http://www.w3.org/International/tutorials/bidi-xhtml/

This article describes design concepts for sites that support right-to-left languages (including Arabic and Hebrew), with emphasis on Arabic due to it being a more complex language because some letters get connected to others and some do not.

Even though this article is talking about website design, it has a good amount of how Arabic and English languages should be mixed.

看透却不说透 2024-11-15 03:22:23

有一种简单的方法可以在 Windows 下的任何应用程序中插入从右到左和从左到右标记:

1- 从右到左标记:从键盘右侧数字键盘输入 ALT + 0254
2- 从左到右标记:从键盘右侧数字键盘输入 ALT + 0253

无需使用任何特殊编辑器或宏,这可以在任何应用程序中使用,无论是在记事本、Word、HTML、XML...等中。

希望如此对每个人都有帮助

最好的问候
您的阿拉伯语翻译团队

There a simple way to insert the right to left and left to right marks in any application under windows:

1- Right to left mark: ALT + 0254 from the right numeric pad in the keyboard
2- Left to Right mark: ALT + 0253 from the right numeric pad in the keyboard

Withouusing any special editors or macros, this can be used in any application, whether in Notepad, Word, HTML, XML... etc.

Hopefully, this would be helpful for everybody

Best regards
Your Arabic Translation Team

忆悲凉 2024-11-15 03:22:23

1-我开发了一些支持阿拉伯语的 Android 应用程序,并且我使用 Notepad++ 编辑资源文件,没有任何问题。 只需记住从视图菜单 (Ctrl+Alt+R) 中选择 RTL

几乎所有支持 Unicode 的 Android 设备都会显示阿拉伯字母,但如果 Bidi 算法不是特定 Android 版本的一部分,您可以使用自定义库来连接字母并正确显示阿拉伯语。

这是我之前使用过的一个库

一个描述如何使用它的博客

2- 一般来说,我不建议混合阿拉伯语和英语,特别是如果它涉及特殊字符,因为它可能会显示得很尴尬。

1- I developed few Android apps that support Arabic and I am using Notepad++ to edit the resources file without any problems. Just remember to select RTL from view menu (Ctrl+Alt+R).

Virtually all Android devices that support Unicode will display Arabic letters, but if bidi algorithm is not part of specific Android version you can use a custom library to connect letters and display Arabic correctly.

Here is a library that I used before

A Blog that describes how to use it

2- In general, I would not recommend mixing Arabic and English especially if it will involve special characters as it can be displayed awkwardly.

素食主义者 2024-11-15 03:22:23

我知道Eclipse部分,Eclipse中的默认字体不支持Unicode,所以将其更改为“Aria Unicode MS”字体。要在 Eclipse 工作区中执行此操作,请单击菜单栏中的 Windows ->首选项->一般->外观->颜色和字体。现在,在右侧的文件资源管理器类似菜单中,展开“基本”,选择“文本字体”,然后单击“编辑..”按钮。

希望这能解决您使用 Eclipse 的查看问题。

关于阿拉伯语应用程序名称问题,想一想,如果本地化正确,那么只有当用户将手机区域设置(以及语言)更改为阿拉伯语时,才会显示应用程序的阿拉伯语名称,否则将显示默认的英文应用程序名称。因此,只需在阿拉伯语 string.xml 中设置阿拉伯语名称,在英语中设置英语,就可以了。

I know the Eclipse part, the default font in Eclipse doesnt support Unicode, So change it to "Aria Unicode MS" font. To do this in Eclipse workspace click on Windows in Menu Bar -> Preferences -> General -> Appearance -> Colors and Fonts. Now in the file explorer like menu in right, expand Basic, select "Text Font" and click on Edit.. button.

Hope this solves your viewing issue with Eclipse.

About Arabic app name issue, think on this, if you do localization correctly, then the Arabic name for app will be displayed only when the user changes the handset locale (and thus language) to Arabic, otherwise the default English app name will be displayed. So, just set the Arabic name in Arabic string.xml and English in the English one and you should be good.

倾城月光淡如水﹏ 2024-11-15 03:22:23

至于编辑部分,不了解平台是无法回答你的问题的。在 Windows 上,标准记事本就可以了。

对于混合字符串来说,这是相当常见的情况。通常应用程序名称不会被翻译。另外,有时你需要在括号中添加一些英文描述。在这种情况下,您可能需要使用强方向性标记(否则括号看起来有点奇怪的)。

As for editor part, there is no way to answer your question without knowing the platform. On Windows, standard Notepad should do.

For mixing strings, it is rather common scenario. It is typical that App Name won't get translated. Also, sometimes you need to put some English description in the brackets. You might need to play with strong directionality marks in such case (otherwise brackets would look a bit strange).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文