Download the PHP package krombox/form-auto-translation-bundle without Composer

On this page you can find all versions of the php package krombox/form-auto-translation-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package form-auto-translation-bundle

Build Status

FormAutoTranslationBundle

Add a possibility to autotranslate form fields on button click. New form type: krombox_auto_translations.

Requirements

Installation

Add the repository to your composer.json

"krombox/form-auto-translation-bundle": "dev-master"

Run Composer to install the bundle

php composer.phar update krombox/form-auto-translation-bundle

Add to AppKernel Register the bundle in /app/AppKernel.php:

<?php

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Krombox\FormAutoTranslationBundle\KromboxFormAutoTranslationBundle(),
            new A2lix\TranslationFormBundle\A2lixTranslationFormBundle(),
            new Knp\DoctrineBehaviors\Bundle\DoctrineBehaviorsBundle(),
            new MatthiasNoback\MicrosoftTranslatorBundle\MatthiasNobackMicrosoftTranslatorBundle()
        );
    }
}

Configuration Referance

Configure the bundle in app/config.yml:

a2lix_translation_form:
    locale_provider: default       
    locales: [ru, en, fr, uk]     
    default_locale: en            
    required_locales: [ru, en]
    manager_registry: doctrine
    templating: "A2lixTranslationFormBundle::default.html.twig"

matthias_noback_microsoft_translator:
    oauth:
        client_id: **********************
        client_secret: *******************    

krombox_form_auto_translation:
    auto_translated_locales: [ru, en, fr, uk]
    locale_provider: default
    templating: "KromboxFormAutoTranslationBundle::default.html.twig"

Configure the bundle in app/routing.yml:

krombox_form_auto_translation: 
    resource: "@KromboxFormAutoTranslationBundle/Resources/config/routing.yml"

Template must contains bootstrap and fontAwasome for standart way view. So, add them somehow you prefer:

{% block stylesheets %}
    <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css" />            
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">        
{% endblock %}

Include javascripts template and init autotranslate plugin:

{% block javascripts %}    
    {% include 'KromboxFormAutoTranslationBundle::javascripts.html.twig' %}
    <script>                                               
        $(document).ready(function(){                                                
            $('.autotranslatable').autotranslate();                                                
        });
    </script>
{% endblock %}

Use Bootsrap form theme on *.html.twig template for nice look(not necessary):

{% form_theme form 
    'bootstrap_3_layout.html.twig'
%}

Usage

Now you can use new form type krombox_auto_translations:

public function buildForm(FormBuilderInterface $builder, array $options)
{
    $builder
        ->add('translations', 'krombox_auto_translations')    
        ...
    ;
}

All versions of form-auto-translation-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
doctrine/orm Version ~2.4
doctrine/doctrine-bundle Version ~1.4
symfony/monolog-bundle Version ~2.4
symfony/twig-bundle Version ~2.3
twig/extensions Version ~1.0
a2lix/translation-form-bundle Version ^2.0
knplabs/doctrine-behaviors Version ~1.1
matthiasnoback/microsoft-translator-bundle Version ~0.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package krombox/form-auto-translation-bundle contains the following files

Loading the files please wait ....