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

Translation issue with Router #24

Open
bruno911 opened this issue Dec 7, 2016 · 1 comment
Open

Translation issue with Router #24

bruno911 opened this issue Dec 7, 2016 · 1 comment

Comments

@bruno911
Copy link

bruno911 commented Dec 7, 2016

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.

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-router; a new issue has been opened at laminas/laminas-router#8.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants