Skip to content

Commit

Permalink
Merge pull request #2 from jannescb/1.x
Browse files Browse the repository at this point in the history
set correct translatin locale in litstack
  • Loading branch information
cbl committed Oct 9, 2020
2 parents 7c7b3ed + 12dd9ec commit a7be1e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Localize/TransRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ public function __construct(array $locales = [])
*/
public function getLocale()
{
if (explode('/', request()->path())[0] === config('lit.route_prefix')) {
return $this->getFallbackLocale();
}

if (count($this->locales) <= 1) {
return $this->getFallbackLocale();
}
Expand Down

0 comments on commit a7be1e3

Please sign in to comment.