How can i link google translator to my project

I am doing a project with my student
We are making a multiple language translator app, so can you please help in this
How cam we do this without hyperlinking the google traslator website

Did some digging on what you were looking for… and came up with 2 possible solutions you either

A:) use an api host for the requests that you’d like to translate (CDO limits this to the whitelisted sites so you may have to email the dev team to add another link)

B:) set up your own translator within CDO to handle it which will require intricate knowledge of the lanugage translation and other stuff

Personally I don’t have any experience in language translation and most sites that do offer an API cost money unless your willing to make your own host on a provider on replit or something but that full circles us back to Option A… I could potentially create something like that but it’ll take time i don’t have at the moment maybe someone will accomplish this or has already

Update: turns out i did manage to find site that is willing to translate it for free though this isn’t a whitelisted site and if you want something like this you’ll most likely have to ask the support or dev team to add this link i did have some time and did create a back-end which won’t need any special formatting or header stuff in the address bar though it’s been specialized for mostly just testing at the moment… perhaps those who wish for this link to be whitelisted may get what there looking for right now it’s set to only return images because i was testing other things and I’d definitely wouldn’t mind if CDO decided to fork a version of this either that or since their backed by AWS perhaps they’d be interested in lending their language API to us as well?

Wow, this sounds like a really huge project! I wonder if it might be useful to focus on a minimum viable product first. How could you translate a single language? Say 100 words in that language? What happens if you try to create a sentence rather than words? You’re going to need to store data including the word, part of speech, and relationship with other words in the sentence.

Start small. Add layer by layer (all apps get new versions/features). If you or a group of students continue to build it out you may have a multilingual tool!

1 Like

You can look at this. It used to work. You probably need to look into the API and get a new key.

var languageCodes = { English: "en", 
                      French:  "fr", 
                      Italian: "it", 
                      Russian: "ru", 
                      German:  "de", 
                      Spanish: "es"};
var url = "";
var key = "trnsl.1.1.20200409T180927Z.686d7717beaaaa2f.5ab7d2937b2968285ee34d9f63b2ab1c4462ca2f";

onEvent("translateButton", "click", translate);

function translate() {
  var originalText = getText("originalText");
  var inLanguage = languageCodes[getText("originalLanguage")];
  var outLanguage = languageCodes[getText("translationLanguage")];
  var request = url+"?key="+key+"&text="+originalText+"&lang="+inLanguage+"-"+outLanguage+"&format=plain";
  startWebRequest(request, function(status, type, content) {
    if(status == 200) {
      setText("translationText", JSON.parse(content).text[0]);
    } else {
      setText("translationText", "Couldn't translate that!");

I couldn’t put the project link here for some reason. Anyway, interfaces change. Right now this interface doesn’t work. But it is one way to make something like that work.

Indeed! though I’d suggest using Libre rather than yandex since there are hosting sites that don’t require an API key not to mention that if you aren’t satisfied with the code you can also host it yourself if you’d like not to mention that it also seems the free API key period has expired since 2020 at least from what I’ve read I believe a link like this way you won’t have to pay for it especially if your going to try it out but then again you may need an actual backed for this which i have provided if you’d like to test that out I’ll provide a sample link below since even if startWebRequest had the link whitelisted but who knows maybe someone may come up with a better idea though it’s surprising that AWS doesn’t give CDO there API for language conversion