Hi,

I don't have answer but maybe this will shed some light?:

http://zend-framework-community.634137.n4.nabble.com/Fwd-About-Translatable-segments-td4660214.html


On 5 August 2013 14:17, Ralf Eggert <[email protected]> wrote:

> Hi,
>
> > 1. Can I configure the translator in the module.config.php as well or
> >    do I need to do it in the Module::onBootstrap() all the time?
>
> I solved this issue by using my I18nListener which implements the
> ListenerAggregateInterface. So don't worry about that.
>
> > 2. Is the translation only working for segment routes? Or can it also
> >    be used with others like literal or regex?
>
> Unfortunately, I have big problems in understanding how to write
> translatable routes. For example, I have this route defined:
>
> ----------------------------------------------------------------------
> 'user-profile' => array(
>     'type'    => 'segment',
>     'options' => array(
>         'route'    => '/user-profile[/:action[/:id]]',
>         'constraints' => array(
>             'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
>             'id'         => '[0-9]+',
>         ),
>         'defaults' => array(
>             'controller' => 'user-profile',
>             'action'     => 'index',
>         ),
>     ),
> ),
> ----------------------------------------------------------------------
>
> In a first step, I want to action parameter to be translatable. I tried
> to change the route to '/user-profile/{action}[/:id]' but without success.
>
> To make sure, I want these routes translated:
>
> /user-profile/mitglied  => /user-profile/member
> /user-profile/bild      => /user-profile/image
> /user-profile/anschrift => /user-profile/address
>
> /user-profile/mitglied/2  => /user-profile/member/2
> /user-profile/bild/2      => /user-profile/image/2
> /user-profile/anschrift/2 => /user-profile/address/2
>
> Can anyone please help?
>
> Thanks and best regards,
>
> Ralf
>
> --
> List: [email protected]
> Info: http://framework.zend.com/archives
> Unsubscribe: [email protected]
>
>
>

Reply via email to