<?php
// +----------------------------------------------------------------------
// | 多语言设置
// +----------------------------------------------------------------------

return [
    // 默认语言
    'default_lang'    => env('lang.default_lang', 'en'),
    // 允许的语言列表
    'allow_lang_list' => ['zh','zh-tw','en','pt','ja','ko','th','id','vi','pt-br','hi','en-ph','en-in','tl'],
    // 多语言自动侦测变量名
    'detect_var'      => 'lang',
    // 是否使用Cookie记录
    'use_cookie'      => true,
    // 多语言cookie变量
    'cookie_var'      => 'think_lang',
    // 扩展语言包
    'extend_list'     => [
        'zh'    => [
            app()->getBasePath() . 'lang/zh.php',
        ],
        'zh-tw'    => [
            app()->getBasePath() . 'lang/zh-tw.php',
        ],
        'en'    => [
            app()->getBasePath() . 'lang/en.php',
        ],
        'pt'    => [
            app()->getBasePath() . 'lang/pt.php',
        ],
        'ja'    => [
            app()->getBasePath() . 'lang/ja.php',
        ],
        'ko'    => [
            app()->getBasePath() . 'lang/ko.php',
        ],
        'th'    => [
            app()->getBasePath() . 'lang/th.php',
        ],
        'id'    => [
            app()->getBasePath() . 'lang/id.php',
        ],
        'vi'    => [
            app()->getBasePath() . 'lang/vi.php',
        ],
        'pt-br'    => [
            app()->getBasePath() . 'lang/pt-br.php',
        ],
        'hi'    => [
            app()->getBasePath() . 'lang/hi.php',
        ],
        'en-ph'    => [
            app()->getBasePath() . 'lang/en-ph.php',
        ],
        'en-in'    => [
            app()->getBasePath() . 'lang/en-in.php',
        ],
        'tl'    => [
            app()->getBasePath() . 'lang/tl.php',
        ],
        'zh-cn'    => [
            app()->getBasePath() . 'lang/zh_cn.php',
        ],
        'en-us'    => [
            app()->getBasePath() . 'lang/en_us.php',
        ],
    ],
    // Accept-Language转义为对应语言包名称
    'accept_language' => [
        // 'zh-Hans' => 'zh-cn',
        'zh-cn' => 'zh',   // 让 zh-cn 指向 zh
        'zh-CN' => 'zh',   // 兼容大写
        'en-us' => 'en',   // 可选：让 en-us 指向 en
        'en'    => 'en',
    ],
    // 是否支持语言分组
    'allow_group'     => true,
];
