Answer the question
In order to leave comments, you need to log in
How to configure localization in VUE CLI frontnet and Laravel backend?
There is a bunch of vue cli frontend and laravel 7 backend. How to set up so that when choosing a language on the frontend, the backend gives translations in this language? Everywhere writes something like this
Route::get('welcome/{locale}', function ($locale) {
if (! in_array($locale, ['en', 'es', 'fr'])) {
abort(400);
}
App::setLocale($locale);
//
});
Answer the question
In order to leave comments, you need to log in
We have a package for this, please visit this page https://laravel-news.com/laravel-localization-vue-...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question