PHPackages                             leaseweb/gettext-translation-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. leaseweb/gettext-translation-bundle

ActiveSymfony-bundle[Localization &amp; i18n](/categories/localization)

leaseweb/gettext-translation-bundle
===================================

Easy to use and native (faster) gettext translation support

v1.1.1(8y ago)2460.6k↓50%8[1 issues](https://github.com/LeaseWeb/LswGettextTranslationBundle/issues)[2 PRs](https://github.com/LeaseWeb/LswGettextTranslationBundle/pulls)MITPHPPHP &gt;=5.3.2CI failing

Since Apr 10Pushed 5y ago22 watchersCompare

[ Source](https://github.com/LeaseWeb/LswGettextTranslationBundle)[ Packagist](https://packagist.org/packages/leaseweb/gettext-translation-bundle)[ Docs](http://www.leaseweblabs.com)[ RSS](/packages/leaseweb-gettext-translation-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (7)Used By (0)

LswGettextTranslationBundle
===========================

[](#lswgettexttranslationbundle)

The LswGettextTranslationBundle adds gettext translation support to your Symfony4 application. It is aimed to be faster and more user-friendly than the built-in translation support of Symfony4.

Requirements
------------

[](#requirements)

- PHP with gettext support
- Symfony 4+

Installation
------------

[](#installation)

Installation is broken down in the following steps:

1. Download LswGettextTranslationBundle using composer
2. Enable the Bundle
3. Install the needed locales
4. Set the language in your application

### Step 1: Download LswGettextTranslationBundle using composer

[](#step-1-download-lswgettexttranslationbundle-using-composer)

Add LswGettextTranslationBundle in your composer.json:

```
{
    "require": {
        "leaseweb/gettext-translation-bundle": "*",
        ...
    }
}
```

Now tell composer to download the bundle by running the command:

```
$ php composer.phar update leaseweb/gettext-translation-bundle
```

Composer will install the bundle to your project's `vendor/leaseweb` directory.

### Step 2: Enable the bundle

[](#step-2-enable-the-bundle)

Enable the bundle in the kernel:

```
