Browse Source

Merge pull request #1226 from akuzemchak/bug/language-routes

Fixes language URI routing issue
Taylor Otwell 12 years ago
parent
commit
4b7dc2e824
1 changed files with 1 additions and 1 deletions
  1. 1 1
      laravel/laravel.php

+ 1 - 1
laravel/laravel.php

@@ -137,7 +137,7 @@ $languages[] = Config::get('application.language');
 
 
 foreach ($languages as $language)
 foreach ($languages as $language)
 {
 {
-	if (starts_with($uri, $language))
+	if (preg_match("#^{$language}(?:$|/)#i", $uri))
 	{
 	{
 		Config::set('application.language', $language);
 		Config::set('application.language', $language);