Open weierophinney opened 4 years ago
I was going to report the same.
I can get past line 5 replacing it with:
$translator = new Zend\Mvc\I18n\Translator(new Zend\I18n\Translator\Translator());
While this allows the example to run, it does not change the language. And indeed, the example never specifies German.
Yet another problem: the __call() function of Translator (surely used for addTranslationFilePattern()) is marked as deprecated.
Originally posted by @Chealer at https://github.com/zendframework/zend-validator/issues/106#issuecomment-240204583
I resolve my issue exactly in the same way than you.
Originally posted by @igormx at https://github.com/zendframework/zend-validator/issues/106#issuecomment-242848382
phpArray is re-added to zend-i18n src/Translator/LoaderPluginManager.php
https://github.com/zendframework/zend-i18n/pull/56
Originally posted by @samsonasik at https://github.com/zendframework/zend-validator/issues/106#issuecomment-303998030
The section "Using pre-translated validation messages" on the Zend Validator documentaion has the following example:
Fist Zend\Mvc\I18n\Translator(); needs an I18nTranslatorInterface and that's not documented on this example.
The another problem with this example is that it throws this Exception:
Because the alias for Zend\I18n\Translator\Loader\PhpArray now is "phparray" not "phpArray"
Originally posted by @igormx at https://github.com/zendframework/zend-validator/issues/106