Introduction
If you want to store translations of your models into the database, this package is for you.
This is a Laravel package for translatable models. Its goal is to remove the complexity in retrieving and storing multilingual model instances. With this package you write less code, as the translations are being fetched/saved when you fetch/save your instance.
Installation
Quick Example
Getting translated attributes
Saving translated attributes
Filling multiple translations
Filling multiple translations wrapped
You may define a wrapper property when creating new translations. Set the translations_wrapper
property in translatable config file:
Then just wrap multiple locales using that property:
Tutorials
Credits
Tom Witkowski current maintainer
Dimitrios Savvopoulos original author
David Llop refactoring testsuite
Caneco artwork
Versions
Package | Laravel | PHP |
---|---|---|
v11.13 - v11.15 |
|
|
v11.12 - v11.12 |
|
|
v11.10 - v11.11 |
|
|
v11.6 - v11.9 |
|
|
v11.4 - v11.5 |
|
|
v11.0 - v11.3 |
|
|
Treeware
You're free to use this package, but if it makes it to your production environment I would highly appreciate you buying the world a tree.
It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to plant trees. If you contribute to my forest you’ll be creating employment for local families and restoring wildlife habitats.
You can buy trees at https://offset.earth/treeware
Read more about Treeware at https://treeware.earth
Last updated