PHPackages                             happyr/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. happyr/translation-bundle

Abandoned → [php-translation/symfony-bundle](/?search=php-translation%2Fsymfony-bundle)Symfony-bundle[Localization &amp; i18n](/categories/localization)

happyr/translation-bundle
=========================

Integrate Symfony with translations SaaS like http://localise.biz

0.4.3(8y ago)5288.8k22[7 PRs](https://github.com/Happyr/TranslationBundle/pulls)1MITPHPPHP ^5.5.9 || ^7.0

Since Dec 23Pushed 8y ago8 watchersCompare

[ Source](https://github.com/Happyr/TranslationBundle)[ Packagist](https://packagist.org/packages/happyr/translation-bundle)[ Docs](http://developer.happyr.com)[ RSS](/packages/happyr-translation-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (11)Versions (10)Used By (1)

Happyr Translation Bundle
=========================

[](#happyr-translation-bundle)

[![Latest Version](https://camo.githubusercontent.com/3bfb03ef07c59c2e7fdecf72418758a96ab52d3b8cf34fa85a98b9d0c93f6d21/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f4861707079722f5472616e736c6174696f6e42756e646c652e7376673f7374796c653d666c61742d737175617265)](https://github.com/Happyr/TranslationBundle/releases)[![Build Status](https://camo.githubusercontent.com/f61100a6a676126aa8c24d33bc676c461df18b7608d628df88bdea3e9850d046/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f4861707079722f5472616e736c6174696f6e42756e646c652e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/Happyr/TranslationBundle)[![Code Coverage](https://camo.githubusercontent.com/4192cc2bac6bb73539d603abae9007238e78bc86bef7b9369755fd44f8d1cbf6/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f4861707079722f5472616e736c6174696f6e42756e646c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/Happyr/TranslationBundle)[![Quality Score](https://camo.githubusercontent.com/e1956f86a1e48451d0357339c490a864d9a234124fb3bab2ae44b23862e04bfd/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f4861707079722f5472616e736c6174696f6e42756e646c652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/Happyr/TranslationBundle)[![Total Downloads](https://camo.githubusercontent.com/f638d37cd34cc9ac126b1e5b1e63e38a63fbc4b01c20f11e826cb227aa6b969e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6861707079722f7472616e736c6174696f6e2d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/happyr/translation-bundle)

DEPRECATED: Use php-translation/symfony-bundle
==============================================

[](#deprecated-use-php-translationsymfony-bundle)

This bundle has been deprecated in favor of [php-tranlation/symfony-bundle](https://packagist.org/packages/php-translation/symfony-bundle). We took all features form this bundle and put them (and many more) at php-translation.

The bundle will still live here forever but no new features or bugfixes will be merged. Forking or moving this repo to new maintainers will not make any sense since that is pretty much what we already done in php-translation.

---

This bundle helps you to integrate with a third party translation service. The bundle has been focused to integrate to the [Loco](https://localise.biz) service. If you want to know how Happyr work with this bundle you should check out [this blog post](http://developer.happyr.com/how-happyr-work-with-symfony-translations).

The key features of this bundle is:

- Easy to download all translations from
- Support for multiple projects
- Create new translation assets by the Symfony WebProfiler
- Edit, flag and synchronize the translation via the Symfony WebProfiler
- Auto upload missing translations to SaaS

Usage
-----

[](#usage)

To download all translations from Loco, simply run:

```
php app/console happyr:translation:download
```

When you have added new translations you may submit these to your translation SaaS by the WebProfiler toolbar.

[![New translations to SaaS](src/Resources/doc/images/missing-translation-example.gif)](src/Resources/doc/images/missing-translation-example.gif)

You may also change translations and flag them from the same WebProfiler page.

[![Manage translations with SaaS](src/Resources/doc/images/edit-flag-sync-example.gif)](src/Resources/doc/images/edit-flag-sync-example.gif)

When you want to fetch new translations from your SaaS you should run the synchronize command. This command will keep your current placeholders from missing translations.

```
php app/console happyr:translation:sync
```

Install
-------

[](#install)

Install the bundle with `composer require happyr/translation-bundle`

You do also need to choose what library to use when you are sending http messages. Consult the [php-http/client-implementation](https://packagist.org/providers/php-http/client-implementation) virtual package to find adapters to use. For more information about virtual packages please refer to [Httplug](http://docs.httplug.io/en/latest/virtual-package/). Example:

```
composer require php-http/guzzle6-adapter
```

Enable the bundle in your kernel:

```
