| @@ 45-51 (lines=7) @@ | ||
| 42 | // Set user locale |
|
| 43 | if ($user->locale) { |
|
| 44 | $this->setIfAllowed($user->locale); |
|
| 45 | } else { |
|
| 46 | if (config('localizer.set_auto_lang')) { |
|
| 47 | $this->setIfAllowed(Identify::lang()->getLanguage()); |
|
| 48 | } else { |
|
| 49 | $this->setIfAllowed(config('localizer.default_lang')); |
|
| 50 | } |
|
| 51 | } |
|
| 52 | } else { |
|
| 53 | if ($request->session()->has('locale')) { |
|
| 54 | $this->setIfAllowed(session('locale')); |
|
| @@ 55-61 (lines=7) @@ | ||
| 52 | } else { |
|
| 53 | if ($request->session()->has('locale')) { |
|
| 54 | $this->setIfAllowed(session('locale')); |
|
| 55 | } else { |
|
| 56 | if (config('localizer.set_auto_lang')) { |
|
| 57 | $this->setIfAllowed(Identify::lang()->getLanguage()); |
|
| 58 | } else { |
|
| 59 | $this->setIfAllowed(config('localizer.default_lang')); |
|
| 60 | } |
|
| 61 | } |
|
| 62 | } |
|
| 63 | } |
|
| 64 | ||