2017 © Pedro Peláez
 

symfony-bundle personal-translations-widget-bundle

Adds translations widget based on Personal translations

image

ladela/personal-translations-widget-bundle

Adds translations widget based on Personal translations

  • Wednesday, August 30, 2017
  • by rodgermd
  • Repository
  • 0 Watchers
  • 2 Stars
  • 17,224 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 18 Versions
  • 2 % Grown

The README.md

Installation

Add to composer.json:, (*1)

"ladela/personal-translations-widget-bundle" : "dev-master"

Add to AppKernel.php:, (*2)

new Ladela\PersonalTranslationsWidgetBundle\PersonalTranslationsWidgetBundle(),

To edit template, copy this file:, (*3)

Resources/views/Form/translatable_field_widget.html.twig located in the bundle directory
~~~~

to
~~~~
app/Resources/PersonalTranslationsWidgetBundle/views/Form/translatable_field_widget.html.twig located in the project root

Languages configuration

Getter service, (*4)

The service should have a tag languages_getter and return array of languages: code = > name, (*5)

  tags:
    - { name: languages_getter }
use Ladela\PersonalTranslationsWidgetBundle\TranslationsGetter\TranslationsGetterInterface;

class LanguagesGetter implements TranslationsGetterInterface
{
  public function getLanguages()
  {
    return array('en' => 'English', 'de' => 'Deutsch');
  }
}

or use languages as array:, (*6)

personal_translations_widget:
  languages:
        en: English
        es: Spanish

Sonata Admin sample

protected function configureFormFields(FormMapper $form)
{
  $subject = $form->getAdmin()->getSubject();
  $form
    ->add('translations', 'translatable_field', array(
    'personal_translation' => 'Site\BaseBundle\Entity\AccommodationTranslation',
    'fields' => array('title', 'description', 'secondary_text'),
    'widgets' => array('title' => 'text', 'description' => 'textarea', 'secondary_text' => 'textarea'),
    'field_options'  => array('secondary_text' => array('attr' => array('class' => 'text-field')))
  ))
}

The Versions

30/08 2017

dev-master

9999999-dev https://github.com/rodgermd/PersonalTranslationsWidget.git

Adds translations widget based on Personal translations

  Sources   Download

MIT

The Requires

 

by Alexander Murashov

translations twig form

30/08 2017

v0.8.0

0.8.0.0 https://github.com/rodgermd/PersonalTranslationsWidget.git

Adds translations widget based on Personal translations

  Sources   Download

MIT

The Requires

 

by Alexander Murashov

translations twig form

05/07 2017

v0.7.1

0.7.1.0 https://github.com/rodgermd/PersonalTranslationsWidget.git

Adds translations widget based on Personal translations

  Sources   Download

MIT

The Requires

 

by Alexander Murashov

translations twig form

07/10 2016

v0.7.0

0.7.0.0 https://github.com/rodgermd/PersonalTranslationsWidget.git

Adds translations widget based on Personal translations

  Sources   Download

MIT

The Requires

 

by Alexander Murashov

translations twig form

28/01 2015

v0.6.7

0.6.7.0 https://github.com/rodgermd/PersonalTranslationsWidget.git

Adds translations widget based on Personal translations

  Sources   Download

MIT

The Requires

 

by Alexander Murashov

translations twig form

22/12 2014

v0.6.6

0.6.6.0 https://github.com/rodgermd/PersonalTranslationsWidget.git

Adds translations widget based on Personal translations

  Sources   Download

MIT

The Requires

 

by Alexander Murashov

translations twig form

22/12 2014

v0.6.5

0.6.5.0 https://github.com/rodgermd/PersonalTranslationsWidget.git

Adds translations widget based on Personal translations

  Sources   Download

MIT

The Requires

 

by Alexander Murashov

translations twig form

10/12 2014

v0.6.4

0.6.4.0 https://github.com/rodgermd/PersonalTranslationsWidget.git

Adds translations widget based on Personal translations

  Sources   Download

MIT

The Requires

 

by Alexander Murashov

translations twig form

10/12 2014

v0.6.3

0.6.3.0 https://github.com/rodgermd/PersonalTranslationsWidget.git

Adds translations widget based on Personal translations

  Sources   Download

MIT

The Requires

 

by Alexander Murashov

translations twig form

10/12 2014

v0.6.1

0.6.1.0 https://github.com/rodgermd/PersonalTranslationsWidget.git

Adds translations widget based on Personal translations

  Sources   Download

MIT

The Requires

 

by Alexander Murashov

translations twig form

10/12 2014

v0.6.2

0.6.2.0 https://github.com/rodgermd/PersonalTranslationsWidget.git

Adds translations widget based on Personal translations

  Sources   Download

MIT

The Requires

 

by Alexander Murashov

translations twig form

09/12 2014

v0.6.0

0.6.0.0 https://github.com/rodgermd/PersonalTranslationsWidget.git

Adds translations widget based on Personal translations

  Sources   Download

MIT

The Requires

 

by Alexander Murashov

translations twig form

08/12 2014

v0.5.0

0.5.0.0 https://github.com/rodgermd/PersonalTranslationsWidget.git

Adds translations widget based on Personal translations

  Sources   Download

MIT

The Requires

 

by Alexander Murashov

translations twig form

13/06 2014

v0.4.0

0.4.0.0 https://github.com/rodgermd/PersonalTranslationsWidget.git

Adds translations widget based on Personal translations

  Sources   Download

MIT

The Requires

 

by Alexander Murashov

translations twig form

12/05 2014

v0.3.4

0.3.4.0 https://github.com/rodgermd/PersonalTranslationsWidget.git

Adds translations widget based on Personal translations

  Sources   Download

MIT

The Requires

 

by Alexander Murashov

translations twig form

12/05 2014

v0.3.3

0.3.3.0 https://github.com/rodgermd/PersonalTranslationsWidget.git

Adds translations widget based on Personal translations

  Sources   Download

MIT

The Requires

 

by Alexander Murashov

translations twig form

12/05 2014

v0.3.2

0.3.2.0 https://github.com/rodgermd/PersonalTranslationsWidget.git

Adds translations widget based on Personal translations

  Sources   Download

MIT

The Requires

 

by Alexander Murashov

translations twig form

06/12 2013

v0.3.1

0.3.1.0 https://github.com/rodgermd/PersonalTranslationsWidget.git

Adds translations widget based on Personal translations

  Sources   Download

MIT

The Requires

 

by Alexander Murashov

translations twig form