Download the PHP package coldume/translated-exception without Composer
On this page you can find all versions of the php package coldume/translated-exception. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download coldume/translated-exception
More information about coldume/translated-exception
Files in coldume/translated-exception
Download coldume/translated-exception
More information about coldume/translated-exception
Files in coldume/translated-exception
Vendor coldume
Package translated-exception
Short Description Automatic exception message translation
License MIT
Homepage https://github.com/coldume/translated-exception
Package translated-exception
Short Description Automatic exception message translation
License MIT
Homepage https://github.com/coldume/translated-exception
Keywords translationexception
Please rate this library. Is it a good library?
Informations about the package translated-exception
TranslatedException
Depict
Previously:
+-------------+ 'hello' received
| Client side | <-----------------------+
+-------------+ |
| |
v |
+-------------------+ |
| Do somthing wrong | |
+-------------------+ |
| |
v |
+-------------------------------+ |
| throw new \Exception('hello') | |
+-------------------------------+ |
| |
v |
+---------------------------------+ |
| Catch and echo $e->getMessage() | ----+
+---------------------------------+
Now:
+-------------+ 'bonjour' received
| Client side | <-------------------------------------+
+-------------+ |
| |
v |
+-------------------+ |
| Do somthing wrong | |
+-------------------+ |
| |
v |
+----------------------------------------+ |
| throw new TranslatedException('hello') | |
+----------------------------------------+ |
| |
v +---------------------+ |
+---------------------+ | Translator | |
| Inside | --> | locale: "fr" | |
| TranslatedException | <-- | dictionary: "fr-en" | |
+---------------------+ +---------------------+ |
| |
v |
+---------------------------------+ |
| Catch and echo $e->getMessage() | ------------------+
+---------------------------------+
Installation
Simply add a dependency on coldume/translated-exception to your project's composer.json file:
`
Usage
``
Resources
-
Symfony translation component.
http://symfony.com/doc/current/components/translation/index.html
All versions of translated-exception with dependencies
PHP Build Version
Package Version
The package coldume/translated-exception contains the following files
Loading the files please wait ....