Extend zf2 component

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Extend zf2 component

Norbert Máté
Hi everyone,
   does anybody know how can I extend and use a zf2 component. I want to
overwrite the translate, translatePlural functions in
i18n/Translator/Translator.
I want the translate function to support 'replacement parameters' so if I
have a translation like this:

'email_forgot_password_hello' => 'Hi %1$s'

after I got the translation I want to replace the %1$s using vsprintf.
I think the best approach to this would be to extend the zf2 component and
somehow setup the new component for the translator service.

Regards,
Norbert.