languara/symfony

Languara localization plugin for Symfony 2.x. Easily upload, translate, and synchronize your language content using Languara's Cloud Based Translation Management Platform.

1.0.1 2016-03-27 14:50 UTC

This package is not auto-updated.

Last update: 2024-03-16 13:53:30 UTC


README

Install

Add Languara plugin information to your composer.json file:


"require": {
    "languara/symfony": "1.0.*@dev"
}

Use composer to install this package.


$ composer update

Register the package

Add the package to the autoload array in app/AppKernel.php:


public function registerBundles()
{
    $bundles = array(
        // .....
        new Languara\SymfonyBundle\LanguaraSymfonyBundle(),
    )
}

Configure the Package

.....

Usage

Execute this command to see a list of available commands in your commandline:


$ php app/console

Or you can check the commands and their usage here:


$ php app/console languara:translate [options]

to translate the texts you already have in your lang directory. You can also select the type of translation you want to perform, Machine or Human. It's set to machine by default.


$ php app/console languara:pull

to download your content from Languara to your app.


$ php app/console languara:push

to upload your content from your app to Languara.


$ php app/console languara:register

to register a new user on languara.com

Troubleshooting

Some version of the Symfony framework come with the "platform" field set to php version 5.3.9. This plugin requires php version >=5.5, so in your composer.json file find this code:


"config": {
    "bin-dir": "bin",
    "platform": {
        "php": "5.3.9"
    }
},

and just remove the "platform" property and it's value from the composer.json