通过我的应用程序使用谷歌翻译

发布于 2024-11-29 05:26:33 字数 167 浏览 2 评论 0原文

我的应用程序中有两个文本框和按钮,一个用于主要文本,另一个用于翻译文本。

我正在尝试通过 Google 翻译 API 来完成此任务,但问题是我必须注册我的网站,我仍在笔记本电脑上开发和运行我的应用程序。

我可以使用 API 密钥做什么?在没有网站的情况下如何获取它?

谢谢

I have two text boxes and button in my application, one for the main text and the other for the translated text.

I am trying to do this task by Google translation API, the problem that I have to sign up my website, I am still developing and running my application on my laptop.

What can I do with the API key? How can I get it without having a website?

Thanks

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

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

发布评论

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

评论(2

怂人 2024-12-06 05:26:33

重要提示:Google Translate API 已于 2011 年 5 月 26 日正式弃用。由于广泛滥用会造成巨大的经济负担,您每天可以发出的请求数量将受到限制,并且 API将于2011 年 12 月 1 日完全关闭。对于网站翻译,我们鼓励您使用 Google Translate Element。

正如 Google 所建议的那样,也许使用已经制作的内容比创建自己的内容更简单:

此处:http ://www.google.com/webelements/#!/translate

<!-- Google Translate Element -->
<div id="google_translate_element" style="display:block"></div><script>
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: "af"}, "google_translate_element");
};</script>
<script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

或此处:http://babelfish.yahoo.com/free_trans_service

Important: The Google Translate API has been officially deprecated as of May 26, 2011. Due to the substantial economic burden caused by extensive abuse, the number of requests you may make per day will be limited and the API will be shut off completely on December 1, 2011. For website translations, we encourage you to use the Google Translate Element.

As Google suggests perhaps it would be simpler than creating your own to use one thats already made:

Here: http://www.google.com/webelements/#!/translate

<!-- Google Translate Element -->
<div id="google_translate_element" style="display:block"></div><script>
function googleTranslateElementInit() {
  new google.translate.TranslateElement({pageLanguage: "af"}, "google_translate_element");
};</script>
<script src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

or here: http://babelfish.yahoo.com/free_trans_service

梦中楼上月下 2024-12-06 05:26:33

谷歌说:

我们强烈建议您在每个请求中包含 API 密钥。尽管
不需要密钥,使用密钥可以让我们识别并联系您
纠正任何问题。详细了解为什么拥有
API 密钥

看来你不需要一个。

Google says:

We highly encourage you to include an API key with each request. While
a key is not required, using one allows us to identify and contact you
to correct any problems. Read more about why it's useful to have an
API key
.

Seems you don't need one.

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