tobur/gedmo-translation-form

There is no license information available for the latest version (0.4.6) of this package.

Installs: 1 487

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 4

Forks: 0

Open Issues: 0

Type:symfony-bundle

0.4.6 2018-10-17 09:08 UTC

This package is not auto-updated.

Last update: 2024-06-09 03:34:30 UTC


README

How to look like

Setup:

composer require tobur/gedmo-translation-form

Add to config parameters:

locales:
  - ua
  - en
default_locale: ua

To twig:

twig:
  form_themes:
    - 'GedmoTranslationFormBundle:Form:translatable.html.twig'

How to use in Sonata "configureFormFields":

        $formMapper->add(
            'name',
            TranslationType::class,
            [
                'required_locales' => ['en'],
                'type' => TextType::class,
            ]
        );

        $formMapper->getFormBuilder()->setData($this->getSubject());