This package provides an interface for Laravel-Backpack
to manage translations stored in database with spatie/laravel-translation-loader
.
Requires the intl
PHP extension (http://php.net/intl).
You can install the package via composer:
composer require novius/laravel-backpack-translation-manager
The package spatie/laravel-translation-loader
is automatically installed (composer dependency), but you have to configure it manually.
Please follow these instructions: https://github.com/spatie/laravel-translation-loader#installation
Only for Laravel <= 5.4 :
... in config/app.php
:
'providers' => [
// ...
Novius\Backpack\Translation\Manager\Providers\TranslationServiceProvider::class,
]
In order for the translation manager to be accessible trought the sidebar in the admin panel, you have to overload the view resources/views/vendor/backpack/base/inc/sidebar.blade.php
and add :
<li>
<a href="{{ url(config('backpack.base.route_prefix', 'admin').'/'.config('translation-manager.route_prefix')) }}"><i class="fa fa-cog"></i> <span>{{ trans('translation-manager::crud.sidebar_title') }}</span></a>
</li>
@todo
- Handle pluralization
- Extract vendor dictionaries (via namespace)
- Write Usage section in README