Change language in Laravel 5

前端 未结 3 1246
北海茫月
北海茫月 2020-12-16 04:37

I just begin to use Laravel 5.4, In the login.blade.php i have

I don\'t like to put plain text in html code, is there a solution to make all the texts in s

3条回答
  •  悲&欢浪女
    2020-12-16 04:51

    Try this!

    {{ @lang('messages.login') }}
    

    Now Add login key with it's value under language file as below

    return['login'=>'Login']; // write inside messages file

    and Set your APP Config Local Variable Like 'en','nl','us'

    App::setLocale(language name); like 'en','nl','us'

提交回复
热议问题