class Localization
{
+
+ protected $rtlLocales = ['ar'];
+
/**
* Handle an incoming request.
*
$locale = setting()->getUser(user(), 'language', $defaultLang);
}
+ // Set text direction
+ if (in_array($locale, $this->rtlLocales)) {
+ config()->set('app.rtl', true);
+ }
+
app()->setLocale($locale);
Carbon::setLocale($locale);
return $next($request);