问题标签 [google-translation-api]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python-2.7 - 我正在尝试使用 google translate api,并且该 api 被应用引擎标准环境调用
我正在尝试使用 google translate api,并且该 api 被应用引擎标准环境调用。在我的开发环境中 dev_appserver.py 向我抛出以下错误ImportError: No module named pkg_resources
我检查了文件夹,没有名为“pkg_resources”的文件。有人遇到过类似的问题吗?
c# - WebClient returning unidentified encoding from Google Translate API?
I'm using this link: https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=en&dt=t&q=myTextHere
When I feed it Japanese characters such as, テスト中..., the DownloadString method returns strange characters such as this: ム† ã,¹ãƒä¸ ...
The correct string should be "Under Test..."
You can see for yourself by clicking the link on your browser: https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=en&dt=t&q=テスト中
I've tried multiple things such as setting the client's encoding to UTF-8 and using HttpUtility.UrlEncode(myText)
but I could not get what my browser returns. Swapping DownloadString for DownloadFile as txt returns the same incorrect text. How do I get the same results as the browser?
Here's a small code snippet that resembles my environment:
jquery - 使用 Google 翻译 Jquery 翻译多个 DIV
我正在使用这个 Google Translate JQuery 脚本来翻译我的博客项目:
但现在我只能翻译正文而不是页面标题。是否也可以翻译 pagetitle DIV 中的文本?
r - 如何使用 R 使用 Google Translate API 进行 POST 调用
我的 Get 工作正常...
我的 POST 不起作用
我试图让语言检测工作我的理解是我们需要在 JSON 文件中发布到谷歌 API 但是我收到错误 #"code": 400, #"message": "Required Text"
我希望有人能指出我正确的方向我知道有一个 R 包但我正在尝试学习如何在没有包的情况下做到这一点,因为有时谷歌或微软会更新他们的 API 并且 # 包没有得到更新(示例:自 API 更新以来,TranslateR 不支持 Microsoft,因此我想尽可能多地学习如何手动执行此操作 # https://cloud.google.com/translate/docs/quickstart?csw=1 https: //translation.googleapis.com/ $discovery/rest?version=v2
google-translate - 如何在谷歌翻译文本文件中使用 notranslate
如何告诉谷歌不要翻译文本文件中的某些文本文件?这是我的示例文本文件:
"hp1": "向右滑动以显示左侧菜单。", "hp2": "(在桌面上单击并从左向右拖动)", "ht": "Welcome", "TITLE": "Welcome" , "名称":"Gowrisankar 雷迪"
谷歌转换上面这样的
“ hp1”:“”ఎడమమెనునిచేయడానికికుడివైపుకుచేయండి。 : "గౌరీశంకర్ రెడ్డి"
我不想转换"name"
. 我怎样才能做到这一点?
我没有使用 HTML,只使用文本文件。
谢谢。
javascript - 从浏览器谷歌翻译Oauth2.0
我正在创建一个使用 Google 翻译服务的简单网页。
该页面有一个用于接收用户输入的字段和一个用于触发对翻译 API 的调用的按钮。它将结果翻译返回给用户。
我已经使用 Ajax 请求成功完成了上述流程,但是访问令牌被硬编码到我的方法中,我想将其更改为在令牌过期时发送的调用(目前我必须使用Google CLI 并在我的代码中替换它)。
我对 Oauth2.0 有非常基本的了解,并且我已经阅读了 Google 文档,但找不到可以告诉我调用端点以从客户端获取访问令牌的部分内容。
有人可以指出我正确的方向吗?
这是我的代码:
HTML:
Javascript
codeigniter - 在代码点火器中将英语输入转换为乌尔都语和土耳其语
在我的代码点火器应用程序中,我想将英语输入转换为乌尔都语和土耳其语。有人可以告诉我该怎么做吗?
php - 使用 Google Translate API 时出错
我刚刚开始学习 Google Translate API,并试图弄清楚如何正确设置它。
首先,我去了https://console.developers.google.com
我设置帐单的地方,创建了一个项目,进入“凭据”并生成了一个 API 密钥。
然后我转到命令提示符并按照此处描述的步骤通过 composer 安装。我不得不使用composer require google/cloud
,因为composer require google/cloud-translation
给出了错误。
这安装得很好,我现在可以看到目录C:\wamp64\www\myproject\vendor\google\cloud\Translate
。
然后我尝试创建一个简单的脚本,如下所示:
但我收到以下错误消息:
我是新手,所以我不确定我是否做对了,或者我是否遗漏了一些东西。
codeigniter - 谷歌翻译 API 不工作
在我的 codeigniter 应用程序中,我想将用户输入从英语翻译成乌尔都语。我一直在使用下面发布的代码,但它不起作用,ii 它不翻译文本。我在浏览器的控制台上没有收到任何错误。
代码: