Skip to content

Commit 2630df3

Browse files
authored
Update Translatable.php
1 parent e5e78cb commit 2630df3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Translatable.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,13 @@ public function getLocaleFromRequest(): string {
3333

3434
if (count($params) > 0) {
3535
$locale = $params[0];
36-
if ($this->checkLocaleInSupportedLocales($locale)) return $locale;
36+
37+
if ($this->checkLocaleInSupportedLocales($locale)) {
38+
return $locale;
39+
}
3740
}
3841

39-
return config('translatable.fallback_locale');
42+
return app()->getLocale() ?? config('translatable.fallback_locale');
4043
}
4144

4245
/**

0 commit comments

Comments
 (0)