bunta/translations
translations
instalation
add to "\config\app.php":
'providers' => [
...
Bunta\Translations\TranslationsServiceProvider::class
...
],
add to "\app\SomeModel.php":
...
use \Bunta\Translations\TranslationsTrait;
...
public $translatedAttributes = ['nameVirtualAttributeToTranslate'];
...
run comands
composer du
php artisan optimize
php artisan vendor:publish
php artisan migrate
Usage
Access to right translate
$model->nameVirtualAttributeToTranslate;
Access to all translates
@foreach(Config::get('translations.locales') as $lang)
{!! Form::text("nameVirtualAttributeToTranslate[$lang]",$model->translation('nameVirtualAttributeToTranslate',$lang)) !!}
@endforeach
save translate
Model::create($request->all());
Related Packages
mominalzaraa/filament-localization
The first and only automatic Filament localization package with intelligent reso...
3,699
11
now-here/laravel-gettext
Adds localization support to laravel applications in an easy way using Poedit an...
11,756
0
aar/laravel-auto-translator
A comprehensive, high-performance translation management system for Laravel with...
6
0