| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public function handle(Request $request, Closure $next) |
||
| 26 | { |
||
| 27 | // Try to get the current locale from the session. |
||
| 28 | $locale = session('jaxonCurrentLocale', LaravelLocalization::getCurrentLocale()); |
||
| 29 | LaravelLocalization::setLocale($locale); |
||
|
|
|||
| 30 | |||
| 31 | // Same as for SetAppLocale, excepted that the locale is read in the session. |
||
| 32 | Carbon::setLocale($locale); |
||
| 33 | setlocale(LC_TIME, $locale); |
||
| 34 | // For comparison of strings with accented characters in french |
||
| 35 | setlocale(LC_COLLATE, LaravelLocalization::getCurrentLocaleRegional() . '.utf8'); |
||
| 36 | |||
| 37 | return $next($request); |
||
| 38 | } |
||
| 40 |