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

Commit 8ac020e

Browse files
authored
Update setting-locale-without-routing-parameter.md
Fix the removing the locale segment so it works with both formats : `de` *and* `de_DE`
1 parent 43d99d1 commit 8ac020e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/book/cookbook/setting-locale-without-routing-parameter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class SetLocaleMiddleware implements MiddlewareInterface
6060
$this->helper->setBasePath($locale);
6161

6262
return $delegate->process($request->withUri(
63-
$uri->withPath(substr($path, 3))
63+
$uri->withPath(substr($path, strlen($locale)+1))
6464
));
6565
}
6666
}

0 commit comments

Comments
 (0)