raffaalves/bing-translation

Port of the Bing Translate PHP wrapper for laravel 4.2

Installs: 106

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1

Open Issues: 0

pkg:composer/raffaalves/bing-translation

dev-master 2015-01-14 20:27 UTC

This package is auto-updated.

Last update: 2025-09-26 07:00:54 UTC


README

######Copied from Laravel 4 Bing Translation Library, but with another autentication

Installation

Install this package through Composer. To your composer.json file, add:

"require-dev": {
    "raffaalves/bing-translation": "dev-master"
}

Next, run composer update to download it.

or

$ composer require raffaalves/bing-translation

Finally, add the service provider to app/config/app.php, within the providers array.

'providers' => array(
    // ...

    'Raffaalves\BingTranslation\BingTranslationServiceProvider'
)

Configuration

Run php artisan config:publish raffaalves/bing-translation to publish the package config file. Add your API key and your done.

Usage

This package is a laravel 4 port of the Microsoft Bing Translation PHP wrapper. Instructions can be found here: Microsoft Bing Translation PHP wrapper

Example

$text = 'Hello world!';
$translatedText = Bing::translate( $text, "en", "fr" );
dd($translatedText);