Skip to content

Instantly share code, notes, and snippets.

@BMU-Verlag
Created December 19, 2019 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BMU-Verlag/ee5e1b3832ea0b25630fc423d5e9280b to your computer and use it in GitHub Desktop.
Save BMU-Verlag/ee5e1b3832ea0b25630fc423d5e9280b to your computer and use it in GitHub Desktop.
function initLanguageSelect() {
var url = "https://translate.yandex.net/api/v1.5/tr.json/getLangs?key=<API-Key>&ui=en";
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
console.log(this.reponseText);
}
};
xhttp.open("GET", url, true);
xhttp.send();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment