-
Notifications
You must be signed in to change notification settings - Fork 2
Objectives of this package
Localisation for models is currently handled already by a few packages, (notably https://github.com/Anahkiasen/polyglot). So why develop another package? There's a few reasons. For one, polyglot (and others) attach translated fields and values to the model. We at Tectonic are not a fan of this approach, as it means bundling yet more knowledge and logic into the already heavy Eloquent models.
Secondly, we wanted a true separation of concerns. Models we believe should be used as schema descriptors of your database and nothing more. So what did we do?
We love Laravel's sugary syntax. It makes developing fun and a real joy to use. We wanted to continue this syntactical sugar in a Laravel way, providing the ability for developers to translate models, or collections of models, and ensure that it could be easily dropped in to the system, even as responses should you so wish.
The goals of the Laravel Localisation package are as follow:
- Provide an easy-to-use API that can be used across combination of models or collections
- Ensure that the translator works in a Laravellian way, using facades
- Require very little work on the behalf of the developer
We believe we have succeeded in all of these goals.
-
Home
- Objectives of this package
- [Who this package is for](Who this package is for)
- [Working with the Translator](Working with the Translator)
- [How it works](How it works)