【问题标题】:How to dynamically translate in real time using the Google Translation API?如何使用 Google Translation API 进行实时动态翻译?
【发布时间】:2018-03-30 16:48:04
【问题描述】:

当用户输入文字时,谷歌翻译会动态地实时翻译对方的文字。

在 translate.google.com 上试用一下

现在我希望在我正在构建的翻译网站上模仿这个功能。我正在使用 React 进行开发。

谢谢。

【问题讨论】:

    标签: html reactjs google-cloud-platform google-translate translate


    【解决方案1】:

    为此,您可以使用google translate API

    • Google 提供了很好的文档和教程here

    如果你想实现异步调用,你需要在输入每个单词后创建一个ajax request

    • React 提供了很好的文档和教程here

    【讨论】:

      猜你喜欢
      • 2018-08-30
      • 2014-04-21
      • 2011-03-24
      • 2014-07-14
      • 2019-01-01
      • 1970-01-01
      • 2016-02-26
      • 1970-01-01
      • 2018-04-30
      相关资源
      最近更新 更多