朱纯树博客
VPS测评推荐网站
cloudacead cloudacead

初始化的laravel-admin框架,界面默认是英文,配置中文的步骤

  1. 通过 composer 安装语言包:
    composer require "overtrue/laravel-lang:~3.0"
  2. 将项目文件 config/app.PHP 中的
    Illuminate\Translation\TranslationServiceProvider::class 替换为
    Overtrue\LaravelLang\TranslationServiceProvider::class
  3. 修改项目文件 config/app.php:
    'locale' => 'en' 修改为 'locale' => 'zh-CN'
  4. 在 .env 文件中添加语言:
    APP_LOCALE=zh-CN
  5. 在项目文件 bootstrap/app.php 中添加下面这行
    $app->register(Overtrue\LaravelLang\TranslationServiceProvider::class);
赞(0) 打赏
未经允许不得转载:VPS测评推荐网站 - 朱纯树博客 » 初始化的laravel-admin框架,界面默认是英文,配置中文的步骤

评论 18

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #30

    Its such as you read my mind! You seem to grasp a lot approximately this, like you wrote
    the e-book in it or something. I think that you can do
    with some % to power the message home a bit, but other than that, that is excellent blog.

    An excellent read. I will certainly be back.

  2. #29

    What’s up to all, how is all, I think every one is getting more from this web site, and your views are
    fastidious in support of new visitors.

    tinyurl.com2周前 (06-13)回复
  3. #28

    My partner and I stumbled over here coming from a different web page and thought I should check things out.
    I like what I see so now i’m following you. Look forward to going over your web page repeatedly.