Git Product home page Git Product logo

google-translate-php's Introduction

google-translate-php

Classe de tradução grátis e ilimitada com o Google Tradutor.

Uso da Classe

Incluindo a classe.

include 'Tradutor.php';

Instanciando a classe e passando parâmetros.

$tradutor=new Tradutor ('en', 'pt');
// Defina o primeiro parâmetro como `null` para detecção automática do idioma.

Traduzindo texto do Inglês para o Português.

echo $tradutor->traduzir ('My name is John From, and I am the god of the box!');

Identificando idioma do texto.

echo $tradutor->detectaIdioma ('My name is John From, and I am the god of the box!');
// return Inglês

// Defina o segundo parâmetro para `true` para retornar o id do idioma.

Idiomas suportados

// Retorna um array com todos os idiomas suportados pelo Google Tradutor.
$tradutor->listaIdiomas ();

Usando Proxy

Após muitas requisições o Google pode bloquear o seu ip,esse bloqueio pode ser ultrapassado usando proxy.

$tradutor=new Tradutor ('pt', 'en', '183.89.8.79:8080');

echo $tradutor->traduzir ('Meu nome é John From, e eu sou o deus da caixa!');

Uso básico e mais simples.

$tradutor=new Tradutor ();

// Traduz do Inglês para o Português.

echo $tradutor->traduzirLang ('en', 'pt', 'My name is John From, and I am the god of the box!');

google-translate-php's People

Contributors

httd1 avatar

Stargazers

 avatar  avatar  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.