mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
18 lines
332 B
PHP
Executable File
18 lines
332 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
use Closure;
|
|
use Illuminate\Support\Facades\App;
|
|
|
|
class Language
|
|
{
|
|
public function handle($request, Closure $next)
|
|
{
|
|
if ($request->header('content-language')) {
|
|
App::setLocale($request->header('content-language'));
|
|
}
|
|
return $next($request);
|
|
}
|
|
}
|