Multiple instances of ITranslator

Notice: This thread is very old.
Etruska
Member | 25
+
0
-

Hi,
I have created wrapper class around Kdyby Translator, which allows me to automatically save not translated expressions into all of the corresponding .neon files and adds other features. All works well, but I have two services implementing Nette\Localization\ITranslator – translation.default by KdybyExtension and mine NeonTranslator. When I try to use IPub/VisualPaginator, which wants to include ITranslator service, expected exception gets thrown:

Service 'visualPaginator.paginator': Multiple services of type Nette\Localization\ITranslator found: translation.default, 90_App_Model_Translate_NeonTranslator

Is there any way to fix it without altering vendor files?

David Matějka
Moderator | 6445
+
+1
-
services:
	translation.default:
		autowired: false
Etruska
Member | 25
+
0
-

Thank you, I didn't even hope for such nice and clean solution :)