Skip to content
Om Puter

Om Puter

Berbagi Tutorial Coding dan Pemrograman Komputer

Menu
  • Channel YouTube ThirteeNov
  • Channel YouTube Om Puter
Menu

Contoh sederhana menggunakan layanan translate dari Azure

Posted on 2 Januari 2026 by OmPuter

Di bawah ini adalah blok kode contoh menggunakan layanan translator azure:

fetch("https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=id", {
  method: "POST",
  headers: {
    "Ocp-Apim-Subscription-Key": "PASTE_API_KEY_KAMU",
    "Ocp-Apim-Subscription-Region": "southeastasia",
    "Content-Type": "application/json"
  },
  body: JSON.stringify([
    { Text: "السلام عليكم ورحمة الله" }
  ])
})
.then(res => res.json())
.then(data => console.log(data[0].translations[0].text));
Post Views: 159

Kategori

  • 3D Max
  • Adobe Animate
  • Android
  • c#
  • Cordova
  • HTML5, CSS & JavaScript
  • iOS
  • Lain-lain
  • Photoshop
  • PHP
  • Python
  • Roblox
  • Tak Berkategori
  • Unity
  • WordPress
ciihuy2020
© 2026 Om Puter | Powered by Superbs Personal Blog theme