承接 smousss/laravel-globalize 相关项目开发

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

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

smousss/laravel-globalize

最新稳定版本:0.1.5

Composer 安装命令:

composer require smousss/laravel-globalize

包简介

Make Laravel projects translatable in a matter of seconds!

README 文档

README

Globalize

Make entire Laravel projects translatable

Latest Version on Packagist GitHub Tests Action Status Total Downloads

Wrapping up every translatable piece of text in every view of an existing Laravel project inside the __() helper is a time-consuming and boring assignment. Luckily, artificial intelligence is perfectly suited for repetitive actions.

-<h2>Create a new post</h2>
+<h2>{{ __('Create a new post') }}</h2>-<footer>© {{ config('app.name') }} {{ date('Y') }}. All rights reserved.</footer>
+<footer>{{ __('© :name :date. All rights reserved.', [
+    'name' => config('app.name'),
+    'date' => date('Y'),
+]) }}</footer>

Installation

Install the package via Composer:

composer require smousss/laravel-globalize

Publish the config file:

php artisan vendor:publish --tag=globalize-config

Usage

First, generate a secret key on smousss.com.

Then, add it to your SMOUSSS_SECRET_KEY environment variable.

Finally, internationalize your views:

php artisan smousss:globalize

Globalize will ask you if you want to process all your views or a selection of them.

Should Globalize process a particular file or everything? [Choose files]:
[0] Choose files
[1] Process everything!

Credits

Globalize for Laravel has been developed by Benjamin Crozat for Smousss (Twitter).

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-30