Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation issue with Router #8

Open
weierophinney opened this issue Dec 31, 2019 · 0 comments
Open

Translation issue with Router #8

weierophinney opened this issue Dec 31, 2019 · 0 comments

Comments

@weierophinney
Copy link
Member

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.


---

Originally posted by @bruno911 at https://github.com/zendframework/zend-router/issues/24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant