Android 自动翻译工具

发布于 2024-12-23 07:00:00 字数 1539 浏览 6 评论 0原文

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

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

发布评论

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

评论(7

青春如此纠结 2024-12-30 07:00:00

2018 年 8 月 11 日更新:Google 不再支持此功能

我没有尝试过,但听说过 Google 翻译工具包。似乎支持多种格式,包括 Android 资源。

  • AdWords 编辑器存档 (.aea)
  • Android 资源 (.xml)
  • Apple iOS
  • 应用程序 (.strings)
  • 应用程序资源包 (.arb)
  • Chrome 扩展程序 (.json)
  • GNU gettext (.po)
  • HTML (.html) )
  • Java 应用程序 (.properties)
  • Microsoft Word (.doc)
  • OpenDocument 文本 (.odt)
  • 文本 (.txt)
  • 富文本 (.rtf)
  • SubRip (.srt)
  • SubViewer (.sub)

Update 11.08.2018: Google not support this any more

I've not tried it but I've heard about Google Translate Toolkit. Appears to support a wide range of formats, including Android resources.

  • AdWords Editor Archive (.aea)
  • Android Resource (.xml)
  • Apple iOS
  • Application (.strings)
  • Application Resource Bundle (.arb)
  • Chrome Extension (.json)
  • GNU gettext (.po)
  • HTML (.html)
  • Java Application (.properties)
  • Microsoft Word (.doc)
  • OpenDocument Text (.odt)
  • Plain
  • Text (.txt)
  • Rich Text (.rtf)
  • SubRip (.srt)
  • SubViewer (.sub)
命硬 2024-12-30 07:00:00

@Pedro Rainho 工具不再工作,因为它使用旧的 api 密钥方法,而 bing 最近更改了该方法。我使用新的 bing 秘密 api 密钥应用程序创建了一个 GUI 应用程序。你可以检查一下。应用程序可在 SourceForge 获取

@Pedro Rainho tool doesn't work anymore because it uses old api key method which bing has recently changed. I have creater a GUI App using new bing secret api key apporach. You can check it. App is available at SourceForge

生寂 2024-12-30 07:00:00

此处在 stackoverflow 上回答了类似的问题。我刚刚在 Windows 7 Pro 下使用了 Android Resource Translator (ART),这是上面“K G”提到的免费软件。对于专门想要翻译 Android 资源文件(如最初要求)的 Windows 用户,这是我找到的最好的免费解决方案。 (我确认谷歌翻译是付费的,发现上面链接中提到的memoQ是一个商业工具)。

ART 快速自动安装。我通过复选框选择了输出语言,它会自动将我的 Android 应用程序的英语 res/values/strings.xml 文件翻译为德语、俄语和法语 XML 文件,在公共“res”目录下输出为 value-de/strings.xml、values -ru/strings.xml 和 value-fr/strings.xml 不到一分钟。然后,我将这些目录复制到项目的“app/src/main/res”文件夹下,并且我的应用程序具有工作翻译。 (我谨慎行事;您可能只需指定应用程序的“res”目录用于输出并跳过复制)。

ART 使用Bing Translate,并且不收取任何费用。这是纯机器翻译,因此结果可能不如人工翻译准确,但对于 Android 资源条目(例如“下载”或“退出”),准确性似乎足够。

警告:GUI 尚未完善。例如:

  • Windows 菜单和任务栏图标的标题为 Android Resource Handler,但应用程序窗口的标题为 Android Resource Translator
  • 我必须在屏幕上拉伸窗口才能显示其 <强>翻译按钮
  • 有一个字段包含文本复制粘贴您的输出文件夹路径。 res 文件夹将在此处创建。除非您在此字段中手动输入目录,否则我不确定是否会生成任何输出或在何处生成。

但这些并不影响功能,只影响方便。

买者自负

  • 法语翻译不会转义撇号,这会导致致命的构建异常。解决方法:手动编辑法语 xml 文件,将 ' 替换为 \'。

执行翻译后,我使用了 Android Studio 的内置 翻译编辑器来验证它们。

正如 KG 所说,可以在 SourceForge 上找到。最后更新于 2015 年 2 月 17 日,本周下载 11 次。源代码位于 github。这是“请注意”。作者在应用程序中添加了一个指向 Paypal 页面的请捐赠链接。

A similar question is answered on stackoverflow here. I have just used Android Resource Translator (ART), freeware mentioned by "K G" above, under Windows 7 Pro. For Windows users wanting specifically to translate Android resource files (as originally asked), this is the best free solution I've found. (I confirm that Google Translate is paid, find that memoQ mentioned in a link above is a commercial tool).

ART installed quickly and automatically. I selected output languages by checkbox and it automatically translated my Android app's English res/values/strings.xml file into German, Russian, and French XML files, output under a common "res" directory as values-de/strings.xml, values-ru/strings.xml, and values-fr/strings.xml in under a minute. I then copied these directories under my project's "app/src/main/res" folder and my app has working translations. (I played it safe; you can probably just specify your app's "res" directory for output and skip the copying).

ART uses Bing Translate, and there is no fee involved. This is pure machine translation, so the result may not be as accurate as human translation, but for Android resource entries like "Download" or "Quit" accuracy seems adequate.

Warning: the GUI is unpolished. For example:

  • The Windows menu and taskbar icon are titled Android Resource Handler but the application window's title is Android Resource Translator
  • I had to stretch the window on my screen to reveal its Translate button
  • There is a field containing the text Copy Paste your output folder path. res folder will be created here. Unless you manually enter a directory in this field, I'm not sure any output is generated, or where.

But these don't affect function, only convenience.

Caveats Emptor:

  • French translation does not escape apostrophes and this causes a fatal build exception. Workaround: edit French xml file manually replacing ' with \'.

Once I performed translations, I used Android Studio's builtin Translations Editor to validate them.

As K G says, available on SourceForge. Last updated 2015-02-17, 11 downloads this week. Source code available at github. This is "begware;" the author includes a Please donate link in the app leading to a Paypal page.

只为守护你 2024-12-30 07:00:00

更通用的翻译和本地化服务:crowdin.com

Bit more universal translation and localization service: crowdin.com

东风软 2024-12-30 07:00:00

我不敢相信我会这么说,但是Bing 有一个免费翻译器。它可以使用 SOAP 进行设置。

以下是一些代码的链接,可帮助您将其添加到您的应用中:

http://code.google.com/p/bing-translator/source/browse/trunk/src/com/saturdaycoder/bingtranslator/BingTranslatorSoapApi.java?spec=svn3&r=3

编辑:
我刚刚发现一款现在确实使用 Bing 的应用程序,其原因与您正在寻找新应用程序的原因完全相同。

http://www.androidzoom.com/android_applications/tools/droid-translate_gghr.html

I can't believe I'm about to say this, but Bing has a free translator. It can be set up using SOAP.

Here is a link to some code to help you with adding it to your app:

http://code.google.com/p/bing-translator/source/browse/trunk/src/com/saturdaycoder/bingtranslator/BingTranslatorSoapApi.java?spec=svn3&r=3

EDIT:
I just found an app that does use Bing now for the exact same reason you are looking for a new one to use.

http://www.androidzoom.com/android_applications/tools/droid-translate_gghr.html

自我难过 2024-12-30 07:00:00

旧帖子,但我创建了一个 androlate gradle 插件,你可以尝试一下。 https://github.com/ayvazj/gradle-androlate-plugin

old post, but I created an androlate gradle plugin you could try. https://github.com/ayvazj/gradle-androlate-plugin

∞琼窗梦回ˉ 2024-12-30 07:00:00

Motodev Studio 有一项功能可以在 Google 翻译的帮助下完成此任务。

Motodev Studio has a feature that does that with the help of Google Translate.

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