google-translate

How set API KEY in Google Translate Node.js code

无人久伴 提交于 2020-03-22 11:03:50
问题 I'm trying to create a Node.js code that uses google translate api. I got the code below from the google doc (https://cloud.google.com/translate/docs/translating-text) But when I run it, it says "Error: The request is missing a valid API key." I have the key, but i don't know how and where to set it. async function translate() { // Imports the Google Cloud client library const { Translate } = require('@google-cloud/translate'); // Creates a client const translate = new Translate(); /** * TODO

How to convert Hindi (Devanagari script) to English letters [closed]

杀马特。学长 韩版系。学妹 提交于 2020-03-18 05:34:38
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 17 days ago . I am facing an issue to convert Hindi text written in the Devanagari script to its equivalent in English/Latin letters. I have a list of names where some are like field=सचिन but I want to convert this into Sachin to show in the frontend. I just need to translate the name, not

How to convert Hindi (Devanagari script) to English letters [closed]

那年仲夏 提交于 2020-03-18 05:34:16
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 17 days ago . I am facing an issue to convert Hindi text written in the Devanagari script to its equivalent in English/Latin letters. I have a list of names where some are like field=सचिन but I want to convert this into Sachin to show in the frontend. I just need to translate the name, not

Your application has authenticated using end user credentials from the Google Cloud SDK which are not supported by the translate.googleapis.com

一笑奈何 提交于 2020-02-24 03:34:09
问题 After reading similar questions, such as: i am using gcp service account but when calling dialogue flow api its giving error : and Why is Google Cloud API trying to connect as an end-user? and applying the suggested solutions I am still getting the error: Caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden { "code" : 403, "errors" : [ { "domain" : "usageLimits", "message" : "Your application has authenticated using end user credentials from the Google

Rails - Google Translate API : ArgumentError: unknown keyword: project

╄→尐↘猪︶ㄣ 提交于 2020-01-25 06:41:13
问题 I have this code that was working on my rails app that is using google Translate API, but on my last commit to heroku I got the error ArgumentError: unknown keyword: project It seems that my google analytics is not working neither. Don't know what is causing the error. Maybe you have a hint ? translate = Google::Cloud::Translate.new project: "my_project" description_translation = translate.translate params[:description], to: 'en' update_attribute(:description, description_translation) 回答1:

How can I get the file “service_account.json” for Google Translate API?

天大地大妈咪最大 提交于 2020-01-24 21:31:07
问题 I try to use the Google Translate API in my development, but i can´t find a way to obtain the "service_account.json" file. The step on "Console Google Cloud Platform": steps on Console Please, I need the steps in detail, since what I get from Google do not serve me Thanks! 回答1: Go to https://console.cloud.google.com/apis/credentials On the top left there is a blue "create credentials" button click it and select "service account key." (see below if its not there) Choose the service account you

How can I get the file “service_account.json” for Google Translate API?

青春壹個敷衍的年華 提交于 2020-01-24 21:30:13
问题 I try to use the Google Translate API in my development, but i can´t find a way to obtain the "service_account.json" file. The step on "Console Google Cloud Platform": steps on Console Please, I need the steps in detail, since what I get from Google do not serve me Thanks! 回答1: Go to https://console.cloud.google.com/apis/credentials On the top left there is a blue "create credentials" button click it and select "service account key." (see below if its not there) Choose the service account you

Google Translate get synonyms and examples

末鹿安然 提交于 2020-01-23 10:33:41
问题 Can I access word's synonyms and examples along with the translation itself, when using Google Translate API? I checked out docs but I don't see anything like that. 回答1: No, you cannot get the synonyms and examples along with the translated text.As currently they have only 3 methods in the Translate API.The 3 methods are detections.list, languages.list and translations.list. So i think it would be great if you make a feature request for this API at PIT of AppEngine. 回答2: Pearson released

Google Translate get synonyms and examples

跟風遠走 提交于 2020-01-23 10:31:14
问题 Can I access word's synonyms and examples along with the translation itself, when using Google Translate API? I checked out docs but I don't see anything like that. 回答1: No, you cannot get the synonyms and examples along with the translated text.As currently they have only 3 methods in the Translate API.The 3 methods are detections.list, languages.list and translations.list. So i think it would be great if you make a feature request for this API at PIT of AppEngine. 回答2: Pearson released

getting a callback to finish before continuing a loop?

限于喜欢 提交于 2020-01-06 19:31:09
问题 so I have been stuck on this for a while. If someone could help me out with this i would really appreciate it! What i want is to have my function and its callback finish before continuing on in a loop. I call "translate_all" after a user has input a text in english in a textarea and has clicked the translate button. ("Method", "g_loop", "g_where" and "go" are global variables.) Ultimately what i want is to have the input english phrase translate to the next language in the array, then have