2017 © Pedro Peláez
 

symfony-bundle sonata-admin-jms-translations

Add JMSTranslationBundle to SonataAdminBundle

image

fidesio/sonata-admin-jms-translations

Add JMSTranslationBundle to SonataAdminBundle

  • Wednesday, June 10, 2015
  • by fidesio
  • Repository
  • 21 Watchers
  • 0 Stars
  • 116 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

KASonataAdminJMSTranslationBundle

Features:

  • Integrate JMSTranslationBundle with SonataAdminBundle
  • Provides add translation message form
  • Invalidate cache from web-interface
  • Remove translation from web-interface

Installation:

Step 1: Download KASonataAdminJMSTranslationBundle using composer

Add KASonataAdminJMSTranslationBundle in your composer.json:, (*1)

For Sonata admin <=2.2 use:

{
    "require": {
        "kluev-andrew/sonata-admin-jms-translations": "dev-master"
    }
}

For Sonata admin >=2.3 use:

{
    "require": {
        "kluev-andrew/sonata-admin-jms-translations": ">=2.3"
    }
}

Now tell composer to download the bundle by running the command:, (*2)

``` bash $ php composer.phar update kluev-andrew/sonata-admin-jms-translations, (*3)


Composer will install the bundle to your project's `KA/SonataAdminJMSTranslationBundle` directory. ### Step 2: Enable the bundle Enable the bundle in the kernel: ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new JMS\DiExtraBundle\JMSDiExtraBundle($this), new JMS\AopBundle\JMSAopBundle(), new JMS\TranslationBundle\JMSTranslationBundle(), new KA\SonataAdminJMSTranslationBundle\KASonataAdminJMSTranslationBundle(), // ... ); }

Step 3: Import KASonataAdminJMSTranslationBundle routing

In YAML somthing like:, (*4)

``` yaml, (*5)

app/config/routing.yml

admin: resource: '@SonataAdminBundle/Resources/config/routing/sonata_admin.xml' prefix: /admin, (*6)

KASonataAdminJMSTranslationBundle_ui: resource: @KASonataAdminJMSTranslationBundle/Controller/ type: annotation prefix: /admin/translations, (*7)


### Step 4: Override your Sonata Admin Layout a) Set configuration: ``` yaml # app/config/config.yml sonata_admin: templates: # default global templates layout: AcmeBundle:CRUD:layout.html.twig

b) Create template, (*8)

{# AcmeBundle/Resources/views/CRUD/layout.html.twig #}

{% extends 'SonataAdminBundle::standard_layout.html.twig' %}

{% block top_bar_after_nav %}
    <li>
        <a href="{{ path('jms_translation_index') }}">JMSTranslations</a>
    </li>
{% endblock %}

Step 5:

Don't forget to configure you SonataAdminBundle and JMSTranslationBundle, (*9)

The Versions

10/06 2015

2.3.x-dev

2.3.9999999.9999999-dev

Add JMSTranslationBundle to SonataAdminBundle

  Sources   Download

Apache2

The Requires

 

by Kluev Andrew

ui translation i18n extraction extract jms multilanguage interface webinterface sonata-admin

02/04 2014

dev-master

9999999-dev

Add JMSTranslationBundle to SonataAdminBundle

  Sources   Download

Apache2

The Requires

 

by Kluev Andrew

ui translation i18n extraction extract jms multilanguage interface webinterface sonata-admin