i18n: s'appuyer sur le fichier fr.json pour l'edition du profil et la page de connexion

This commit is contained in:
jeremy bayse
2026-06-22 13:37:54 +02:00
parent 6d730a4363
commit 0987587a72
7 changed files with 52 additions and 33 deletions
@@ -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 [];
},
];
}
}