{"action":"created","issue":{"url":"https://api.github.com/repos/mcamara/laravel-localization/issues/200","labels_url":"https://api.github.com/repos/mcamara/laravel-localization/issues/200/labels{/name}","comments_url":"https://api.github.com/repos/mcamara/laravel-localization/issues/200/comments","events_url":"https://api.github.com/repos/mcamara/laravel-localization/issues/200/events","html_url":"https://github.com/mcamara/laravel-localization/issues/200","id":67306361,"number":200,"title":"Event routes.translation","user":{"login":"GregoryClaeyssens","id":5057847,"avatar_url":"https://avatars.githubusercontent.com/u/5057847?v=3","gravatar_id":"","url":"https://api.github.com/users/GregoryClaeyssens","html_url":"https://github.com/GregoryClaeyssens","followers_url":"https://api.github.com/users/GregoryClaeyssens/followers","following_url":"https://api.github.com/users/GregoryClaeyssens/following{/other_user}","gists_url":"https://api.github.com/users/GregoryClaeyssens/gists{/gist_id}","starred_url":"https://api.github.com/users/GregoryClaeyssens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GregoryClaeyssens/subscriptions","organizations_url":"https://api.github.com/users/GregoryClaeyssens/orgs","repos_url":"https://api.github.com/users/GregoryClaeyssens/repos","events_url":"https://api.github.com/users/GregoryClaeyssens/events{/privacy}","received_events_url":"https://api.github.com/users/GregoryClaeyssens/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-09T08:20:45Z","updated_at":"2015-09-25T07:05:49Z","closed_at":null,"body":"2 issues with this event listener.\r\n\r\n1. the $locale variable is no longer passed, so it is impossible to know to which language the parameters need to be translated. (also doc's still say this is passed, so I presume this is an error)\r\n\r\n2. If set up the event listener, and it's called as expected. I have tried translating them with a fixed locale ( since this isn't passed anymore, see 1).\r\nI'v checked and the parameters are perfectly translated, but the url's don't seem to use them?\r\n\r\nRoutes.php \r\n```\r\nRoute::get(LaravelLocalization::transRoute('routes.page.show'), array('as' => 'page', 'uses' => 'PageController@show'));\r\n```\r\n\r\nnl/routes.php \r\n```\r\n'page'      => [\r\n        'show'      => '{slug}',\r\n],\r\n```\r\nfr/routes.php \r\n```\r\n'page'      => [\r\n        'show'      => '{slug}',\r\n],\r\n```\r\n\r\nEventServiceProvider.php, boot function\r\n```\r\n        Event::listen('routes.translation', function($attributes)\r\n        {\r\n            $locale = 'fr';\r\n            foreach( $attributes as $k => $v ){\r\n                if($k === 'slug'){\r\n                    $attributes[$k] = RouteTranslator::translateSlug($v, $locale);\r\n                }\r\n            }\r\n            return $attributes;\r\n        });\r\n```\r\n\r\nResults\r\nnl: http://mydomain.com/nl/bedrijven\r\nfr: http://mydomain.com/fr/bedrijven\r\n\r\nWhat i expected\r\nnl: http://mydomain.com/nl/bedrijven\r\nfr: http://mydomain.com/fr/entreprises\r\n\r\nThe thing is the Event is called and the $attributes array is returned with a translated slug.\r\nvar dumb gives me:\r\n```\r\narray(1) {\r\n  [\"slug\"]=>\r\n  string(11) \"entreprises\"\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/mcamara/laravel-localization/issues/comments/143146031","html_url":"https://github.com/mcamara/laravel-localization/issues/200#issuecomment-143146031","issue_url":"https://api.github.com/repos/mcamara/laravel-localization/issues/200","id":143146031,"user":{"login":"GregoryClaeyssens","id":5057847,"avatar_url":"https://avatars.githubusercontent.com/u/5057847?v=3","gravatar_id":"","url":"https://api.github.com/users/GregoryClaeyssens","html_url":"https://github.com/GregoryClaeyssens","followers_url":"https://api.github.com/users/GregoryClaeyssens/followers","following_url":"https://api.github.com/users/GregoryClaeyssens/following{/other_user}","gists_url":"https://api.github.com/users/GregoryClaeyssens/gists{/gist_id}","starred_url":"https://api.github.com/users/GregoryClaeyssens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GregoryClaeyssens/subscriptions","organizations_url":"https://api.github.com/users/GregoryClaeyssens/orgs","repos_url":"https://api.github.com/users/GregoryClaeyssens/repos","events_url":"https://api.github.com/users/GregoryClaeyssens/events{/privacy}","received_events_url":"https://api.github.com/users/GregoryClaeyssens/received_events","type":"User","site_admin":false},"created_at":"2015-09-25T07:05:49Z","updated_at":"2015-09-25T07:05:49Z","body":"Wouldn't getCurrentLocale() return the current locale (as is the name of the function). This would give me 'nl'.(translating from nl to fr). You need 2 locales to be able to translate a parameter. The current locale and the locale you are translating to. (except for the situation where you only have 2)."}}