Download the PHP package a2lix/translation-form-bundle without Composer
On this page you can find all versions of the php package a2lix/translation-form-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download a2lix/translation-form-bundle
More information about a2lix/translation-form-bundle
Files in a2lix/translation-form-bundle
Package translation-form-bundle
Short Description Translate your doctrine objects easily with some helpers
License MIT
Homepage https://github.com/a2lix/TranslationFormBundle
Informations about the package translation-form-bundle
A2lix Translation Form Bundle
Translate your doctrine objects easily with some helps
Branch | Tools |
---|---|
3.x (master) |
Screenshot example
Support
3.x
depends on AutoFormBundle and has higher requirements (PHP8.1+, Symfony5.4+/6.3+/7.0+). It is compatible with KnpLabs, A2lix and Prezent
Installation
Use composer:
After the successful installation, add/check the bundle registration:
Configuration
There is no minimal configuration. Full list of optional parameters:
- Custom locale provider service id. Default one relies on [1-*] values:
- [1-a] List of translations locales to display
- [1-b] Default locale
- [1-c] List of required translations locales
- The default template is Twitter Bootstrap compatible. You can redefine your own here
Usage
In a classic formType
Advanced examples
- Optional. If set, override the default value from config.yml
- Optional. If set, override the default value from config.yml
- Optional. If set, override the auto configuration of fields
- [3.a] Optional. - For a field, applied to all locales
- [3.b] Optional. - For a specific locale of a field
- Optional. Common options of symfony forms (max_length, required, trim, read_only, constraints, ...), which was added 'field_type' and 'display'
- Optional. Set the labels for the translation tabs. Default to the name of the locale. Translation keys can be used here.
Additional
TranslationsFormsType
A different approach for entities which don't share fields untranslated. No strategy used here, only a locale field in your entity.
- Optional. If set, override the default value from config.yml
- Mandatory. A real form type that you have to do
- [2bis] Optional. - An array of options that you can set to your form
TranslatedEntityType
Modified version of the native 'entity' symfony form type to translate the label in the current locale by reading translations
- Path of the translatable class
- Property/Method of the translatable class that will be display
- Common options of the 'entity' Symfony form type (multiple, ...)
Example
See Demo Bundle for more examples.
Contribution help
License
This package is available under the MIT license.
All versions of translation-form-bundle with dependencies
a2lix/auto-form-bundle Version ^0.4
symfony/config Version ^5.4.30|^6.3|^7.0
symfony/dependency-injection Version ^5.4.30|^6.3|^7.0
symfony/doctrine-bridge Version ^5.4.30|^6.3|^7.0
symfony/event-dispatcher Version ^5.4.30|^6.3|^7.0
symfony/form Version ^5.4.30|^6.3|^7.0
symfony/http-foundation Version ^5.4.30|^6.3|^7.0
symfony/http-kernel Version ^5.4.30|^6.3|^7.0
symfony/options-resolver Version ^5.4.30|^6.3|^7.0