承接 h1ch4m/lang-manager 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

h1ch4m/lang-manager

最新稳定版本:v1.3.0

Composer 安装命令:

composer require h1ch4m/lang-manager

包简介

laravel language helper

README 文档

README

Latest Version Total Downloads License

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.

统计信息

  • 总下载量: 109
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-04