Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/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
https://github.com/tremby/laravel-warning-translator
Last synced: about 1 month ago
JSON representation
A drop-in replacement for the Laravel translator which emits warnings and errors when translations had to fall back or were not found
- Host: GitHub
- URL: https://github.com/tremby/laravel-warning-translator
- Owner: tremby
- Created: 2014-10-29T01:28:53.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2020-06-17T20:38:07.000Z (over 4 years ago)
- Last Synced: 2024-11-17T12:48:36.634Z (about 2 months ago)
- Language: PHP
- Size: 2.93 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Warning translator
==================This translator is an extension of [Laravel](http://laravel.com/) 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](http://laravel.com/docs/localization).