PHPackages                             webfactory/icu-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. [Queues &amp; Workers](/categories/queues)
4. /
5. webfactory/icu-translation-bundle

ActiveLibrary[Queues &amp; Workers](/categories/queues)

webfactory/icu-translation-bundle
=================================

Enables ICU message formatting for translations in Symfony applications.

1.1.0(2mo ago)2761.8k↓45.9%3MITPHPPHP 8.1.\*|8.3.\*CI passing

Since Mar 4Pushed 2mo ago8 watchersCompare

[ Source](https://github.com/webfactory/WebfactoryIcuTranslationBundle)[ Packagist](https://packagist.org/packages/webfactory/icu-translation-bundle)[ RSS](/packages/webfactory-icu-translation-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (32)Versions (26)Used By (0)

ICU Translation Bundle
======================

[](#icu-translation-bundle)

[![Build Status](https://camo.githubusercontent.com/b896bc5b6ae0bcccb2a202dc48e3b74818a970450d52b04262b92ac8a7bf76eb/68747470733a2f2f7472617669732d63692e6f72672f776562666163746f72792f576562666163746f72794963755472616e736c6174696f6e42756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/webfactory/WebfactoryIcuTranslationBundle)[![Coverage Status](https://camo.githubusercontent.com/df1ccc6c7a31f479de832f11cd04594afd04f1bc27213d24b6abbb23b561b49b/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f776562666163746f72792f6963752d7472616e736c6174696f6e2d62756e646c652f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/webfactory/icu-translation-bundle?branch=master)

While the [Symfony translation component](http://symfony.com/doc/current/components/translation/index.html) does a great job in most cases, it can become difficult to use if you need conditions other than numbers (e.g. gender) or nested conditions. This is where the ICU Translation Bundle steps in. Using the [International Components for Unicode project](http://site.icu-project.org/)'s standard message format, it enhances the Symfony component with arbitrary and nested conditions, as well as easy-to-use localized number and date formatting. The enhancement is non-invasive, i.e. you don't have to touch your former messages, they'll still work as usual.

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

[](#installation)

Assuming you've already [enabled and configured the Symfony translation component](http://symfony.com/doc/current/book/translation.html#book-translation-configuration), all you have to do is to install the bundle via [composer](https://getcomposer.org) with something like this:

```
php composer.phar require webfactory/icu-translation-bundle

```

(We use [Semantic Versioning](http://semver.org/), so as soon as a version tagged 1.0.0 is available, you'll probably want to use something like ~1.0 as the version string.)

As usual, enable the bundle in your kernel:

```
