【发布时间】:2015-12-16 11:12:05
【问题描述】:
我正在尝试在我的应用中启用翻译某些文本。我希望用户能够启动他们在设备上使用的任何翻译工具(谷歌翻译或 iTranslate),无需输入即可查看翻译。为此,我使用的是 url 方案:
googletranslate://
itranslate://
现在,我需要将查询传递给这些应用程序。我知道如何为 iTranslate 执行此操作:
itranslate://translate?from=auto&to=en&text=<encoded_string>
这很酷,现在我想知道如何为 Google 翻译做同样的事情。它需要自动检测语言并将其翻译成英文。
【问题讨论】:
-
@HariKrishnan.P 这解释了翻译 api,我正在尝试使用参数打开 iOS 应用程序。
-
我现在检查了它不工作从链接引用的 api 调用。从 cocoacontrol 试试这个应用程序:cocoacontrols.com/controls/fgtranslator
-
@HariKrishnan.P 这是用于 Google 和/或 Bing 付费服务,我想启动 iOS 版 Google 翻译应用程序,我不想使用翻译 api。
-
从应用程序直接访问谷歌翻译应用程序?
标签: ios google-translate url-scheme