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
- Host: GitHub
- URL: https://github.com/thecodingmachine/utils.i18n.fine.symfony-bridge
- Owner: thecodingmachine
- Created: 2014-04-23T07:51:48.000Z (about 12 years ago)
- Default Branch: 4.0
- Last Pushed: 2014-04-23T13:00:13.000Z (about 12 years ago)
- Last Synced: 2025-06-22T03:56:32.923Z (12 months ago)
- Language: PHP
- Size: 145 KB
- Stars: 0
- Watchers: 13
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.