Google Cloud Translate API with NodeJS | Detect Language and Translate Text to other Language

Ғылым және технология

Hello everyone, I will talk about how you can use Google Cloud Translate API with NodeJS step by step.
Step 1 - Create a new Google Cloud Project, get service account key, enable Google Cloud Translate API
Step 2 - NodeJS part, you need to watch the video.
References:
* Google Cloud Translate API cloud.google.com/translate/do...
* Google Cloud Translate NodeJS Client Package www.npmjs.com/package/@google...
You can download the sample code shown in the video from my GitHub repository
github.com/RajKKapadia/Google...
Feel free to share your experience in the comment section.
My Fiverr profile - www.fiverr.com/rajkkapadia​
My Upwork profile - www.upwork.com/freelancers/~0...
My LinkedIn profile - / rajkkapadia
Enjoy the life, Feel the music.
Peace.

Пікірлер: 99

  • @kurtkenankaan
    @kurtkenankaan2 ай бұрын

    05.05.2024, i tried for my project and it works, thx

  • @muhammadmusharaf4705
    @muhammadmusharaf4705 Жыл бұрын

    Thank you Raj. You saved the day. I've been looking for the work around for the last few days but couldn't find any articles. Your video was straight to the answer and well explained. May you grow more. Love from Pakistan

  • @rajkkapadia

    @rajkkapadia

    Жыл бұрын

    I appreciate you writing this to me... 🙏

  • @mardoqueuoliveira9733
    @mardoqueuoliveira97332 жыл бұрын

    thank you so much that's what i needed this text was translated from portuguese brazil to english through the nodejs application learned here

  • @rajkkapadia

    @rajkkapadia

    2 жыл бұрын

    Hey, thank you for writing to me. I am glad that my work helped you.

  • @GameCrawl
    @GameCrawl3 жыл бұрын

    It works perfectly, thank you!

  • @pronyCJ
    @pronyCJ3 жыл бұрын

    thanks a lot! made me visualize the very textual walkthrough of google apis. the best!

  • @rajkkapadia

    @rajkkapadia

    3 жыл бұрын

    Hello, I am glad that my work helped you.

  • @IsaacYongMusic
    @IsaacYongMusic3 жыл бұрын

    Hi Raj, thanks for your video! Finally find out what I am missing by following your steps :)

  • @rajkkapadia

    @rajkkapadia

    3 жыл бұрын

    I am glad that my work helped you. I appreciate you writing me back.

  • @Jeka_sh
    @Jeka_sh3 жыл бұрын

    Thank you so much!!! You've save my time. Good luck in everything!

  • @rajkkapadia

    @rajkkapadia

    3 жыл бұрын

    I am glad that my work helped you. 🙏 Thank you.

  • @KnaveKaiser
    @KnaveKaiser3 жыл бұрын

    Thank you very much.

  • @abhishekchaudhary4058
    @abhishekchaudhary40583 ай бұрын

    24/04/2024: This seems good. I will try and update

  • @apulibaatawine3999
    @apulibaatawine39998 ай бұрын

    you saved! thanks

  • @leomurillo4621
    @leomurillo4621 Жыл бұрын

    muy buen video

  • @user-eo6jg3fd2g
    @user-eo6jg3fd2g3 жыл бұрын

    Thank you !!!

  • @ephraimmulilo7098
    @ephraimmulilo70983 жыл бұрын

    Thanks!

  • @Sj-xq2nf
    @Sj-xq2nf8 ай бұрын

    thanks a lot sir

  • @RazerSCYNescafe
    @RazerSCYNescafe3 жыл бұрын

    Cool, thanks bro 👍 You deserve to get like and subscribe 👍

  • @rajkkapadia

    @rajkkapadia

    3 жыл бұрын

    Hello, I appreciate your kind words, I am glad that my work helped you.

  • @saurabhutekar8436
    @saurabhutekar84362 жыл бұрын

    Do we need local .json files with key value pair for each language like we do with react i18next or will it translate the whole page dynamically??

  • @props922
    @props9223 жыл бұрын

    Thanks :))

  • @bestofmusicc__
    @bestofmusicc__ Жыл бұрын

    Hello, Can you please make a video on transliterate the text. for eg : hi i am saumya transliterated text : हाई आई एम सौम्या

  • @rahulraw7505
    @rahulraw75052 жыл бұрын

    thanks

  • @soranari2365
    @soranari2365 Жыл бұрын

    Can be used for Flutter also this is legal for app submission

  • @MikixIT
    @MikixIT Жыл бұрын

    lovely church you recording in

  • @stinamller1352
    @stinamller13522 жыл бұрын

    Hi Raj my developer has made an integration with my webshop and google translate program and this working very good. Now we only have one problem. The rule is that everything is translated from Danish to German, Swedish, Italien, English and so on. But we have a lot of English word that we are using in product title on the Danish site because it makes more since to called them English title/names but the problem is that these are translated to german, Swedish and so on and it is not suppuse to do so. So my question is, can we set up an rule in the google cloud translate api that when every there is an English word it can not translate these word? best regard Allan

  • @rajkkapadia

    @rajkkapadia

    2 жыл бұрын

    Hi, first I appreciate you efforts to write me and I am glad that my work helped you. I think it is the only limitation, cause when you pass the sentence to Google translate, it try to translate the sentence irrespective of the English words in it. But may be there will be a solution to it, please read the API documentation.

  • @filobonda
    @filobonda2 жыл бұрын

    Hi! A quick question: sometimes, detecting the language returns "und" (undetermined) which throws a 400 bad request error from the API (APIError). This is very weird, and I cannot find any information about how to debug this online. Got any idea? Thanks!

  • @rajkkapadia

    @rajkkapadia

    2 жыл бұрын

    Hello, thank you for asking a question. But unfortunately, I am not aware of this error, I am not sure if I have ever encountered it, maybe you can check the language code you are passing... All the best...

  • @filobonda

    @filobonda

    2 жыл бұрын

    @@rajkkapadia hi, thank you for your quick reply. Weirdly enough it turns out that if you try to detect the language of a number, it throws an error.

  • @rajkkapadia

    @rajkkapadia

    2 жыл бұрын

    @@filobonda ohhhh, that's a new information... Thank you for sharing...

  • @8bulletballers385
    @8bulletballers385 Жыл бұрын

    Wait so I can call this API directly in react .jsx files? I don’t need an explicit backend to use the API?

  • @rajkkapadia

    @rajkkapadia

    Жыл бұрын

    Yes, you can do that...

  • @MehmetKoseDev
    @MehmetKoseDev2 жыл бұрын

    why don't you import credentials as a json file in javascript? is there a security concern?

  • @rajkkapadia

    @rajkkapadia

    2 жыл бұрын

    There is no security reasons, but if you want to push the code to Github, or you want to deploy it on a public server then it is advisable to use credentials from env file.

  • @phikhanh993
    @phikhanh993 Жыл бұрын

    Hey, first I would like to thank you for making this awesome video,. I have a issue, I wanna translate a word from A to B (German to English for example) that includes its meaning and its type ( like Noun, Verb, Adv or Adj,... ) option: (it's very great if the result includes example with each type) How should I do? Thanks a lot ^^.

  • @rajkkapadia

    @rajkkapadia

    Жыл бұрын

    I appreciate you writing this to me... However, I don't have any knowledge on this, but I assume that since you have come this far and ran the detect language and translate successfully, then you will surely find it if doable...

  • @truenomad8898
    @truenomad88983 жыл бұрын

    Who is here? God, is it you? Nice echo)

  • @rajkkapadia

    @rajkkapadia

    3 жыл бұрын

    I did not realise it until I uploaded.😁

  • @maheshmahadar4780
    @maheshmahadar47802 жыл бұрын

    what about audio ?

  • @rajkkapadia

    @rajkkapadia

    2 жыл бұрын

    I am not sure, I have not used the apis for long, but there will be a facility of that kind for sure.

  • @spankinchicks7469
    @spankinchicks74693 жыл бұрын

    I installed SDL trodos and Omega T. And none of those Cat tools works. Is it because i dont have this G translation API?

  • @rajkkapadia

    @rajkkapadia

    3 жыл бұрын

    Hey, to detect language of a text, you need to have Google cloud translate package.

  • @spankinchicks7469

    @spankinchicks7469

    3 жыл бұрын

    @@rajkkapadia ah ok thanks

  • @jerrycent113
    @jerrycent1132 жыл бұрын

    How can I make my website translate based on the visitors ip address please

  • @rajkkapadia

    @rajkkapadia

    2 жыл бұрын

    There are many services which provides the region of the user, use that to determine the language of the user and then use Google cloud translate to perform translation.

  • @nishanthkumar5637
    @nishanthkumar56373 жыл бұрын

    Can you please tell about document transltion?

  • @rajkkapadia

    @rajkkapadia

    3 жыл бұрын

    Hello, thank you for writing to me. I am sure in a near future I will do a video on this as well.

  • @Akenfelds1
    @Akenfelds1 Жыл бұрын

    Hello Raj, I have a problem using your code. First of all, thank you for posting this video. I've successfully implemented your code. HOWEVER, while it successfully console logs my translations from English to French, I can't seem to load the translated text into a string that I can get out of translateText(). I can create the string variable and console log it, but when I try to use the contents of the string variable elsewhere in my code, it appears to be an empty string! Would you be able to give me a nudge in the right direction?

  • @rajkkapadia

    @rajkkapadia

    Жыл бұрын

    Hi, I am glad that my work helped you... I am not sure about this error, but I think I have shown the string, if you follow closely, I think you will not face the error...

  • @rodrigolema4166

    @rodrigolema4166

    Жыл бұрын

    Hi Kristofers! I am having the same issue. did you solved? thanks in advance!

  • @rajkkapadia

    @rajkkapadia

    Жыл бұрын

    Hi, thank you for reaching out here for help, I just ran the code shown in the video, it worked without any issues, may be you can make sure you followed all the steps.

  • @rodrigolema4166

    @rodrigolema4166

    Жыл бұрын

    @@rajkkapadia Thanks for the reply! yes your code is working for me too, but if I try to make a console.log outside the function is giving me undefined object

  • @rajkkapadia

    @rajkkapadia

    Жыл бұрын

    @@rodrigolema4166 yes, it is because the function is asynchronous, it is how JavaScript works, you need to use then and inside it you can use the output of the API call...

  • @amartya991
    @amartya9912 жыл бұрын

    how can i select basic plan for the same api????

  • @rajkkapadia

    @rajkkapadia

    2 жыл бұрын

    On the Firebase console, you will see a plan changer tab on left side of the screen.

  • @rohitpol
    @rohitpol5 ай бұрын

    Is this REST Api using POST method ??

  • @rajkkapadia

    @rajkkapadia

    5 ай бұрын

    I am not sure since I am using the package...

  • @kamalCode
    @kamalCode3 жыл бұрын

    Sir how to integrate google pay in nodejs website

  • @rajkkapadia

    @rajkkapadia

    3 жыл бұрын

    Sure, I will try to cover that in upcoming tutorials.

  • @spankinchicks7469
    @spankinchicks74693 жыл бұрын

    Mr i dont have a credit card. What should i do? please help

  • @rajkkapadia

    @rajkkapadia

    3 жыл бұрын

    You need to provide credit card, you will not be charged, but it is mandatory, you can use your friends card.

  • @user-hk7px1sx4x
    @user-hk7px1sx4x Жыл бұрын

    What OS are you using?

  • @rajkkapadia

    @rajkkapadia

    Жыл бұрын

    Linux... 😉

  • @namhaitran3832
    @namhaitran38323 жыл бұрын

    Sorry, Can it work with Angular ?

  • @rajkkapadia

    @rajkkapadia

    3 жыл бұрын

    Hello, it can work anywhere, there are client library for every framework. But you can use my demo and create API and call that API from your Angular project.

  • @Tarunkumar_Gatla
    @Tarunkumar_Gatla Жыл бұрын

    Can you show the same project in Java?

  • @rajkkapadia

    @rajkkapadia

    Жыл бұрын

    There is a Java API as well... I don't have experience with Java though. I appreciate your request.

  • @Tarunkumar_Gatla

    @Tarunkumar_Gatla

    Жыл бұрын

    @@rajkkapadia can you share the Java api🙏

  • @spankinchicks7469
    @spankinchicks74693 жыл бұрын

    So if i dont instal this, i cant use Cat Tools?

  • @rajkkapadia

    @rajkkapadia

    3 жыл бұрын

    Hey, I am not able to understand your question.

  • @user-hk7px1sx4x
    @user-hk7px1sx4x3 жыл бұрын

    where did u get that mic from tho

  • @rajkkapadia

    @rajkkapadia

    3 жыл бұрын

    Amazon, it is boya m1 mic.

  • @user-hk7px1sx4x

    @user-hk7px1sx4x

    3 жыл бұрын

    @@rajkkapadia looks more like a boya 1$ mic

  • @rajkkapadia

    @rajkkapadia

    3 жыл бұрын

    @@user-hk7px1sx4x yeah, it is not that powerful. Can you suggest a good budget mic to record audio.

  • @user-hk7px1sx4x

    @user-hk7px1sx4x

    3 жыл бұрын

    @@rajkkapadia tey just buying a hyper x headset they have a pretty good mic

  • @ibrahimjamil3155
    @ibrahimjamil31552 жыл бұрын

    why skip step if you are doing the same thing its distraction

  • @rajkkapadia

    @rajkkapadia

    2 жыл бұрын

    Hello, I did not understand your question.

  • @rahulk._
    @rahulk._4 ай бұрын

    Bhai tu haveli m bethke video bana raha hai kya 😂

  • @shrav8846
    @shrav88463 жыл бұрын

    Is there any translator to use for free?

  • @rajkkapadia

    @rajkkapadia

    3 жыл бұрын

    Thank you asking the question, but I don't have much information on this.

  • @shrav8846

    @shrav8846

    3 жыл бұрын

    @@rajkkapadia ok..thank you👍🏻

  • @shrav8846

    @shrav8846

    3 жыл бұрын

    @@rajkkapadia 😁by the way, have you tried to convert a text file or pdf file from webpage, instead of small text

  • @rajkkapadia

    @rajkkapadia

    3 жыл бұрын

    @@shrav8846 Hey, I have not, but may be you can try, it will work though for sure, cause that is how many website converts their content from one language to another dynamically.

  • @shrav8846

    @shrav8846

    3 жыл бұрын

    @@rajkkapadia thanks for the reply...sure I will try

  • @muratoner6048
    @muratoner60483 жыл бұрын

    Is this api paid?

  • @rajkkapadia

    @rajkkapadia

    3 жыл бұрын

    Yes, Google Cloud Translate API is free upto certain limit after that each request will cost you. Check the free qouta on the website.

  • @abhishekchaudhary4058
    @abhishekchaudhary40582 ай бұрын

    I have made this project in react (and sorry for the audio quality already): kzread.info/dash/bejne/aIB7zMyQmZPLqJM.htmlsi=cCfn19lN2m0LN6_e

  • @ikhsanmnoor8589
    @ikhsanmnoor85893 жыл бұрын

    seem like currently you are in bathroom

  • @rajkkapadia

    @rajkkapadia

    3 жыл бұрын

    😂, actually I am in a room, I did not realised it till I uploaded it. Sorry.

  • @asdfg1346on
    @asdfg1346on4 күн бұрын

    bad video. why is this called a tutorial if you just select something that you already made off camera and dont show us the steps as you should have.

  • @rajkkapadia

    @rajkkapadia

    4 күн бұрын

    Suggestion noted...

  • @valentingorrin4541
    @valentingorrin4541 Жыл бұрын

    Thank you !

  • @joeporsche1767
    @joeporsche17673 жыл бұрын

    Thank you!!!

  • @rajkkapadia

    @rajkkapadia

    3 жыл бұрын

    I am glad that my work helped you.

Келесі