avro/translator-bundle

A symfony2 bundle that uses 3rd party translation apis to translate text

Installs: 6

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/avro/translator-bundle

dev-master 2014-08-07 18:23 UTC

This package is not auto-updated.

Last update: 2025-10-21 08:30:49 UTC


README

A Symfony2 bundle that utilizes Microsoft Translator to translate text. Unlike Google translate, Microsoft translate has a free plan that allows for 2 000 000 characters to be translated per month.

See Microsoft Translator Docs on how to setup your azure account to get your clientID and client secret.

###Install

$ composer install avro/translator-bundle

Add bundle to AppKernel.

    new Avro\TranslatorBundle\AvroTranslatorBundle(),

###Config

avro_translator:
    azure:
        client_id: %azure_client_id%
        client_secret: %azure_client_secret%

###Usage

Translator is available as a service

// translate some text from english to spanish
$newText = $this->container->get('avro_translator.translator')->translate('Some text here', 'en', 'es');

###License MIT