You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
can you specify a source language for the google translate API? #484
I would like to be able to specify a source language. I know I can autodetect, but is there a way to specify exactly the language "i" is and in Czech and so if I want to translate to French, how would I do that?
// Imports the Google Cloud client libraryconstTranslate=require('@google-cloud/translate');// Instantiates a clientconsttranslate=Translate();// The text to translateconsttext='Ahoj světe!';// The source languageconstsource='cs';// The target languageconsttarget='fr';constoptions={from: source,to: target};translate.translate(text,options).then((results)=>{console.log(JSON.stringify(results,null,2));}).catch((err)=>{console.error('ERROR:',err);});
Activity
jmdobry commentedon Sep 20, 2017
chore: release 2.1.3 (#488)
chore: release 2.1.3 (#488)
chore: release 2.5.0 (#485)
chore: release 2.5.0 (#485)
test: upstream breaking change broke tests (#484)