2011/3/28 Benjamin Eberlei <[email protected]>: > I don't see the problem here, just put a message key into the label > renderer variable.
We're not talking about form labels, there your solution is obvious. More important are validation error messages which are currently hard-coded in various XML/PHP files. 2011/3/28 Fabien Potencier <[email protected]>: > I don't see how this could work. In the validation component, you will need > to implement some kind of interface for your translation implementation, but > for sure not the interface from the Translation component. How do you > integrate the translation component then? There are two solutions: Either we define a TranslatorInterface, MessageInterpolatorInterface or something similar in the Validator component and implement an adapter for the Translation component in a bridge. Our performance folks won't like the additional method call here. The second solution is to have a new component or even top-level namespace ("Symfony\Api") with a set of public Symfony2 interfaces. We can only include the TranslatorInterface there for a start. All components either using or implementing on its interfaces of course have a dependency on that namespace, but are decoupled from everything else. If you want more decoupling of components (but you'll probably veto here) we can also move the interfaces of other components (like Validator) there, so other components can rely on the interfaces without actually relying on the implementation (the component). Which ever way we take, hard-coded error messages need to go away. Bernhard -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
