mouf/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

4.0.x-dev 2014-04-23 08:31 UTC

This package is auto-updated.

Last update: 2024-10-15 04:53:02 UTC


README

This package is a bridge between Fine, the translation package used in Mouf and Symfony2's translation system.

Using the SymfonyFineBridge class, Fine can be exposed as a service implementing Symfony's TranslatorInterface. 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.