Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Translation issue with Router #24

@bruno911

Description

@bruno911

Based on the idea of this:

<?= $this->translate(sprintf('My name is %s', 'Bruno')) ?>

I wanted to create a Url segment, for example:

'/{:param1-somelabelhere-:param2}'

Now, let say using array translation I do like this:

<?php
return array(
    ':param1-somelabelhere-:param2' => ':param1-somelabelisnowtranslated-:param2',
);

The issue comes here, when I am in the view, if I do:

Url: <?= $this->url('myroutename', array('param1'=>11, 'param2'=>22)) ?>

It renders as:

Url: /:param1-somelabelisnowtranslated-:param2

Instead of expecting behaviour:

Url: /11-somelabelisnowtranslated-22

Any ideas? It seems to be like a bug. For example in Spanish and English the position of the words is usually different, so it wouldn't make any sense for me to translate something like: english-schools-new-york as ingles-escuelas-nueva-york, that phrase should be translated as escuelas-ingles-nueva-york.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions