定制 tremby/laravel-warning-translator 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

tremby/laravel-warning-translator

最新稳定版本:v1.1

Composer 安装命令:

composer require tremby/laravel-warning-translator

包简介

A drop-in replacement for the Laravel translator which emits warnings and errors when translations had to fall back or were not found

README 文档

README

This translator is an extension of Laravel 4's built-in one. The only differences are these:

  • A warning (Log::warning) is logged whenever the translation is not found in the current locale and it has to fall back to the fallback locale.
  • An error (Log::error) is logged whenever the translation is not found in any locale.

As an exception, any translation key beginning with validation.custom. will not trigger errors.

These logs will be handled however your log messages are normally logged -- whether appearing in the debug bar, logging to a file or going up to a cloud logging service.

Installation

Require it in your Laravel project:

composer require tremby/laravel-warning-translator

Comment out or delete the line in your app/config/app.php which loads the built in translation service provider:

// 'Illuminate\Translation\TranslationServiceProvider',

Add a new similar line in its place or at the bottom of the providers array:

'Tremby\WarningTranslator\WarningTranslationServiceProvider',

Use

Use translations as normal, as described in the Laravel documentation.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-29