lang.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkPHP [ WE CAN DO IT JUST THINK ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: liu21st <liu21st@gmail.com>
  10. // +----------------------------------------------------------------------
  11. // +----------------------------------------------------------------------
  12. // | 多语言设置
  13. // +----------------------------------------------------------------------
  14. use think\facade\Env;
  15. return [
  16. // 默认语言
  17. 'default_lang' => Env::get('lang.default_lang', 'zh-cn'),
  18. // 允许的语言列表
  19. 'allow_lang_list' => [],
  20. // 多语言自动侦测变量名
  21. 'detect_var' => 'lang',
  22. // 是否使用Cookie记录
  23. 'use_cookie' => true,
  24. // 多语言cookie变量
  25. 'cookie_var' => 'think_lang',
  26. // 扩展语言包
  27. 'extend_list' => [],
  28. // Accept-Language转义为对应语言包名称
  29. 'accept_language' => [
  30. 'zh-hans-cn' => 'zh-cn',
  31. ],
  32. // 是否支持语言分组
  33. 'allow_group' => false,
  34. ];