8817effc9a
- 创建 config/translation.php 配置文件
- 将翻译文件从 lang/ 移动到 resource/translations/ 目录
- 按照 Symfony Translation 标准重命名文件 (messages.{locale}.php)
- 删除自定义的 app\util\Lang 类
- 使用官方的 trans() 和 locale() 函数
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
13 lines
266 B
PHP
13 lines
266 B
PHP
<?php
|
|
/**
|
|
* Multilingual configuration
|
|
*/
|
|
return [
|
|
// Default language
|
|
'locale' => 'zh',
|
|
// Fallback language
|
|
'fallback_locale' => ['zh', 'en'],
|
|
// Folder where language files are stored
|
|
'path' => base_path() . '/resource/translations',
|
|
];
|