承接 inspirapuntodo/easy-locale-for-laravel 相关项目开发

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

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

inspirapuntodo/easy-locale-for-laravel

最新稳定版本:0.2.1

Composer 安装命令:

composer require inspirapuntodo/easy-locale-for-laravel

包简介

Easily manage your localization in your laravel app

README 文档

README

Total Downloads Latest Version License

Easy Locale for Laravel

Easy Locale for Laravel is a package intended to make working with localization easier.

Installation

Here's how you track your website with Easy Locale for Laravel:

Requires PHP 8.1+

First, install Easy Locale for Laravel via the Composer package manager:

composer require inspirapuntodo/easy-locale-for-laravel

Next, add the following to config/app.php according to your locales, ex:

/*
|--------------------------------------------------------------------------
| Available locales
|--------------------------------------------------------------------------
|
| All locales supported by your application
| Format:
| - locale_key => locale_name
*/
'available_locales' => [
    'es' => 'Español',
    'en' => 'English',
]

Usage

Create transation files for each locale

php artisan locale:make {locale_path}

Example:

php artisan locale:make locations.cities

Expected output:

Creating localization files for: locations/cities

CREATED 🌎🌍🌏 es/locations/cities 🎉

CREATED 🌎🌍🌏 en/locations/cities 🎉

Hasta luego! 👋

Find differences on existing translation files

php artisan locale:diff

Output on SUCCESS

No differences found in your translation files

Output on FAILURE

Translation for key: orders.status.pending_oayment MISSING on locale ES

You have missing 1 translation\s

TODO

  • Find empty translation keys
  • Find diff on translation definitions, Ex: parameter :name set in spanish, but not in english
  • Find unused translations

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Contributors

Cesar Mendez (@Activ3mined)

Easy Locale for Laravel is an open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

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