Download the PHP package perfectneeds/locale-bundle without Composer
On this page you can find all versions of the php package perfectneeds/locale-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download perfectneeds/locale-bundle
More information about perfectneeds/locale-bundle
Files in perfectneeds/locale-bundle
Download perfectneeds/locale-bundle
More information about perfectneeds/locale-bundle
Files in perfectneeds/locale-bundle
Vendor perfectneeds
Package locale-bundle
Short Description manage multi languages on project
License MIT
Homepage http://perfectneeds.github.com
Package locale-bundle
Short Description manage multi languages on project
License MIT
Homepage http://perfectneeds.github.com
Keywords locale bundlePerfectNeeds
Please rate this library. Is it a good library?
Informations about the package locale-bundle
PerfectNeeds LocaleBundle
Very simple bundle that allows you to translate your entities.
Reference Repo.
https://github.com/vm5/EntityTranslationsBundle
Installation:
- composer require perfectneeds/locale-bundle "~1.0"
- Register bundle in AppKernel.php:
new VM5\EntityTranslationsBundle\VM5EntityTranslationsBundle() - Copy LocaleBundle inside your ptoject in
src/PN/Bundle - Register bundle in AppKernel.php:
new PN\LocaleBundle\LocaleBundle() - Add messages file into
app/Resources/translationsfor each language called messages.{LOCALE}.php (ex. messages.ar.php) - You must add this code in config.yml:
Change the Locale in API methods
Routing example
Example entities:
BloggerTranslation.php in CMSBundle/Entity/Translation
Then you can translate them on yourself
Using form to easily translate entities.
Create BloggerTranslationType class
in CMSBundle/Form/Translation/BloggerTranslationType.php
Add all translatable columns such as BloggerTranslation.php (entity)
add translations field in BloggerType.php
in your main form.
It's important to include required in entry_language_options for specific locales, because validation is triggered only when language is not empty or it's required.
Language is assumed as not empty when at least one of the fields are filled in.
All versions of locale-bundle with dependencies
PHP Build Version
Package Version
The package perfectneeds/locale-bundle contains the following files
Loading the files please wait ...