There is no license information available for the latest version (dev-master) of this package.

Access to the free Microsoft's HTTP translation API

dev-master 2013-05-24 14:51 UTC

This package is auto-updated.

Last update: 2020-07-23 19:09:32 UTC


Translate your texts using Microsoft's Bing Translation services HTTP API

The code is based on the one provided by Microsoft at the documentation, prepared for composer. In two lines, you can have a translation service working!

Before working with the code, get your Access Token, using your MSN account. More info at:

Don't get confused with the clientID. It's not the Customer ID nor your account key. The clientID is the text (possibly your app name or some plain-language text) that you specified when registering your application. You can view your client id here:

There is a free data tier of 2 million characters per month. Check here if you haven't used yet your monthly limit:

Use with composer:

	"require": {
		"natxet/microsoft-translation-api": "*"
	"minimum-stability": "dev"

And then code something like this:

include "vendor/autoload.php";
$config      = array( 'clientID' => 'myproject', 'clientSecret' => 'PYdLDxusfg4+MPdLDxudLDxusfg4+sfg4+Q1XixZ=');
$translator  = new \MicrosoftTranslator\Translate( $config );
$translation = $translator->translate(array('Hola', 'Adiós'), 'en', 'es');
var_dump( $translation );