Maybe is a better idea to establish the language globally using a middleware. In that way, you will be able to show the entire site on Japanese and not only the authentication stuff. You maybe want to change the language based on a user preference or based on any URL segment or even in a session value (it is up on you)
Mar 20, 2017
3
Level 5
Laravel standard Authentication in different languages
Dear Community,
I created the Laravel Authentication through php artisan, now I want to add the Japanese language to the login pages and a new route for /ja/login.
I created a Japanese homepage in my viewController like so:
public function indexJA()
{
\App::setLocale('ja');
return view('layouts.welcome');
}
And then I made a folder 'ja' in recources/views/lang with strings for the Japanese text.
But I'm not sure how to create the Japanese page for all routes/controllers for the Authentication, as Laravel whipped these up for me...
Any ideas?
Please or to participate in this conversation.