This repository has been archived by the owner on Jan 21, 2021. It is now read-only.
Releases: vinkla/laravel-translator
Releases · vinkla/laravel-translator
Add locale key to translate method
This version features a way to specify the locale on the translate
method. Example below.
// Setting the the current locale to English.
App::setLocale('en');
// Returns the article title translated in Swedish.
$article->translate('sv')->title;
// Uses the current locale and returns the English translation.
$article->title;
Add fallback locale support
Add support to fetch a default translation from the database. Read more in #8.
Add getters and setters
Within this release it is now possible to attache the translated attributes to the base model instance. This makes it possible to fetch the translation with $post->title
instead of fetching the attribute with the $post->translate()
method. Though, both ways still works.
Add one to many relation
It is now possible to fetch all translations with $post->translations
.
Add configuration files
This version is shipped with configuration files and a new Laravel service provider.
First initial version
First initial version. Please NOTE that this is work in progress. Documentation is coming soon…