2017 © Pedro Peláez
 

symfony-bundle i18n-bundle

WandiI18nBundle

image

wandi/i18n-bundle

WandiI18nBundle

  • Wednesday, March 28, 2018
  • by wandi
  • Repository
  • 4 Watchers
  • 2 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 13 % Grown

The README.md

I18nBundle

Wandi/I18nBundle is a Symfony bundle used to assist internationalization of projects., (*1)

Setup

Install via composer

$ composer require wandi/i18n-bundle

Registering the bundle

$bundles = [
    // ...
    new \Wandi\I18nBundle\WandiI18nBundle(),
];

How to use

Entity

  • Add TranslatableEntity trait in your Entity.
  • Create many fields as needed foreach languages used.
class Foo
{
    use TranslatableEntity;

    // ...

    /**
     * @var string
     *
     * @ORM\Column(name="bar_fr", type="string", length=255)
     */
    private $barFr;

    /**
     * @var string
     *
     * @ORM\Column(name="bar_en", type="string", length=255)
     */
    private $barEn;
}

View and Controller

  • The trait will automatically use the correct getter depending to the current language used.

View

{{ Foo.bar }}

Controller

$foo->getBar();

The Versions

28/03 2018

dev-master

9999999-dev https://github.com/WandiParis/I18nBundle

WandiI18nBundle

  Sources   Download

MIT

The Requires

 

by Jean-Baptiste Châteaux

bundle symfony wandii18nbundle

28/03 2018

1.0.1

1.0.1.0 https://github.com/WandiParis/I18nBundle

WandiI18nBundle

  Sources   Download

MIT

The Requires

 

by Jean-Baptiste Châteaux

bundle symfony wandii18nbundle

22/01 2018

1.0.0

1.0.0.0 https://github.com/WandiParis/I18nBundle

WandiI18nBundle

  Sources   Download

MIT

The Requires

 

by Jean-Baptiste Châteaux

bundle symfony wandii18nbundle