refactor: 使用官方support\Translation替代自定义Lang类

- 创建 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>
This commit is contained in:
root
2026-02-25 18:18:52 +08:00
parent 2cfca3553c
commit 8817effc9a
7 changed files with 12 additions and 170 deletions
+12
View File
@@ -0,0 +1,12 @@
<?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',
];