GithubHelp home page GithubHelp logo

seanhlewis / translatelove Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 534 KB

A Free and Open Source Machine Translation API

Home Page: https://translate.love

License: GNU General Public License v3.0

Dockerfile 2.29% Python 71.42% CSS 7.28% HTML 16.60% Batchfile 0.70% Shell 1.73%
api language-api language-translation languages machine-translation translate-api translation translation-service

translatelove's Introduction

Translate.love is a free and open source machine translation API developed for translating any variety of text and documents in over 30 different languages. It provides a free-to-use API for real-time development and integration with applications in need of translation services. This project seeks to make translation services easy to access for anyone by providing a FOSS alternative.

API Examples

Simple

Request:

const res = await fetch("https://translate.love/translate", {
  method: "POST",
  body: JSON.stringify({
    q: "Hello!",
    source: "en",
    target: "es"
  }),
  headers: { "Content-Type": "application/json" }
});

console.log(await res.json());

Response:

{
    "translatedText": "¡Hola!"
}

Auto Detect Language

Request:

const res = await fetch("https://translate.love/translate", {
  method: "POST",
  body: JSON.stringify({
    q: "Ciao!",
    source: "auto",
    target: "en"
  }),
  headers: { "Content-Type": "application/json" }
});

console.log(await res.json());

Response:

{
    "detectedLanguage": {
        "confidence": 83,
        "language": "it"
    },
    "translatedText": "Bye!"
}

HTML (beta)

Request:

const res = await fetch("https://translate.love/translate", {
  method: "POST",
  body: JSON.stringify({
    q: '<p class="green">Hello!</p>',
    source: "en",
    target: "es",
    format: "html"
  }),
  headers: { "Content-Type": "application/json" }
});

console.log(await res.json());

Response:

{
    "translatedText": "<p class=\"green\">¡Hola!</p>"
}

Supported Languages

English, Arabic, Azerbaijani, Catalan, Chinese, Czech, Danish, Dutch, Esperanto, Finnish, French, German, Greek, Hebrew, Hindi, Hungarian, Indonesian, Irish, Italian, Japanese, Korean, Persian, Polish, Portuguese, Russian, Slovak, Spanish, Swedish, Turkish, Ukranian

Credit

This translation API was only made possible through the LibreTranslate project. Please support their efforts here.

translatelove's People

Contributors

seanhlewis avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.