Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Translator instead of TranslatorInterface #58

Closed
pasdeloup opened this issue Nov 6, 2014 · 2 comments
Closed

Translator instead of TranslatorInterface #58

pasdeloup opened this issue Nov 6, 2014 · 2 comments
Assignees
Milestone

Comments

@pasdeloup
Copy link

In Twig/DatatableTwigExtension.php and Datatable/View/AbstractDatatableView.php
you must use Symfony\Component\Translation\TranslatorInterface
instead of Symfony\Bundle\FrameworkBundle\Translation\Translator to make it work with Symfony 2.6

@stwe
Copy link
Owner

stwe commented Nov 6, 2014

is

translator: { fallback: "%locale%" }

uncommented?

@pasdeloup
Copy link
Author

Yes I have it.
But the default in 2.6 is to receive with @translator a new service Symfony\Component\Translation\LoggingTranslator
instead of Symfony\Bundle\FrameworkBundle\Translation\Translator

It can be changed in the config with :
translator: { fallback: "%locale%", logging: false }

But it would be better to use the TranslatorInterface instead of the class.

It would also fix the need to uncomment the translator line as the Symfony\Component\Translation\IdentityTranslator you receive in this case also implement TranslatorInterface.

@stwe stwe added this to the v0.6 milestone Nov 7, 2014
@stwe stwe self-assigned this Nov 7, 2014
@stwe stwe closed this as completed in 821b7f5 Nov 8, 2014
@stwe stwe modified the milestones: v0.5.3, v0.6 Dec 28, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants