An open API service indexing awesome lists of open source software.

https://github.com/thecodingmachine/utils.i18n.fine.symfony-bridge

This package contains a bridge between the Symfony TranslatorInterface and FINE. Using this package, FINE can implement Symfony's TranslatorInterface and therefore, can be used with any Symfony component using this interface
https://github.com/thecodingmachine/utils.i18n.fine.symfony-bridge

Last synced: 11 months ago
JSON representation

This package contains a bridge between the Symfony TranslatorInterface and FINE. Using this package, FINE can implement Symfony's TranslatorInterface and therefore, can be used with any Symfony component using this interface

Awesome Lists containing this project

README

          

Fine to Symfony translator bridge
=================================

This package is a bridge between [**Fine**, the translation package used in Mouf](http://mouf-php.com/packages/mouf/utils.i18n.fine/README.md)
and [**Symfony2's translation system**](symfony.com/doc/current/book/translation.html).

Using the `SymfonyFineBridge` class, Fine can be exposed as a service implementing [Symfony's `TranslatorInterface`](http://api.symfony.com/2.0/Symfony/Component/Translation/TranslatorInterface.html).
This means you can use Fine to translate components that expect a Symfony translator instead (usually, Symfony components).

The `SymfonyFineBridge` class implements the `TranslatorInterface` and expects 2 parameters in the constructor:

- a language translation instance (implementing Fine's `LanguageTranslationInterface`)
- a language detection instance (implementing Fine's `LanguageDetectionInterface`)

Install
-------

By default, this package comes with a Mouf install script that will create an instance named `symfonyTranslator` that you can use in your Symfony packages. It maps directly to the default
Fine instance created by Fine when installed.