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
Installs: 1 882
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 14
Forks: 1
Open Issues: 0
Type:mouf-library
Requires
- php: >=5.3.0
- mouf/utils.i18n.fine: ~4.0
- symfony/translation: ~2.4
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.