h1ch4m/lang-manager
Composer 安装命令:
composer require h1ch4m/lang-manager
包简介
laravel language helper
README 文档
README
A Laravel package for create language keys on your lang file from a given path (like views/).
Installation
You can install the package via Composer:
composer require h1ch4m/lang-manager
Service Provider
After installing the package, you need to register the service provider. Add the service provider to your config/app.php file:
'providers' => [ // Other Service Providers... H1ch4m\LangManager\LangManagerServiceProvider::class, ],
Usage
Your sentence should be inside the function __() and use single-quotes ' like:
<h5>{{ __('Your sentence here') }}</h5> <h5>{{ __('Your sentence :here', ['here' => 'sentence value']) }}</h5>
⚠️ Please commit your changes before run the command, just to be able to reset your work if you don't like the command result.
To run the command:
php artisan lang-manager:start
It will ask you
Enter your directory (default is resources/views):
if your directory is resources/views click enter, other ways enter your path that you want to create keys for it.
Than it will ask you for the language:
Enter your files language (default is en):
If your default language is en than click enter, other ways enter your language and hit enter.
You will notice that new files will be created on the lang folder and the sentence on __() will be changed to the keys on the lang files.
h1ch4m/lang-manager 适用场景与选型建议
h1ch4m/lang-manager 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 417 次下载、GitHub Stars 达 1, 最近一次更新时间为 2024 年 10 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 h1ch4m/lang-manager 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 h1ch4m/lang-manager 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 417
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-10-04