zendframework / zend-router

Standalone routing implementation for HTTP and console requests
BSD 3-Clause "New" or "Revised" License
32 stars 20 forks source link

Working with different locales fix proposal #25

Open freeentr opened 7 years ago

freeentr commented 7 years ago

Hello! I work on translatable route segment with 3 locales ['en' => 'en_US', 'lv' => 'lv_LV', 'ru' => 'ru_RU']. However, I need to encode lv & ru translations with rawurlencode() in php array. That is because /Zend/Router/Http/Segment.php method, which performs match against the HTTP request, do not match given url path with generated regex within translation keys loop.

So my proposal is: Encode each translated string before generating regex.

proposal

weierophinney commented 4 years ago

This repository has been closed and moved to laminas/laminas-router; a new issue has been opened at https://github.com/laminas/laminas-router/issues/7.