i18n: s'appuyer sur le fichier fr.json pour l'edition du profil et la page de connexion
This commit is contained in:
@@ -50,6 +50,14 @@ class HandleInertiaRequests extends Middleware
|
||||
return false;
|
||||
}
|
||||
}),
|
||||
'translations' => function () {
|
||||
$locale = app()->getLocale();
|
||||
$file = lang_path("{$locale}.json");
|
||||
if (file_exists($file)) {
|
||||
return json_decode(file_get_contents($file), true);
|
||||
}
|
||||
return [];
|
||||
},
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user