novius / laravel-backpack-translation-manager
This packages provides an interface to manage translations via the Backpack admin panel
Installs: 6 692
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 4
Forks: 6
Open Issues: 2
Requires
- php: >=7.1
- backpack/base: ^0.9
- spatie/laravel-translation-loader: ^2.0 || 1.2.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.10.0
This package is auto-updated.
Last update: 2024-10-26 11:23:06 UTC
README
This package provides an interface for Laravel-Backpack
to manage translations stored in database with spatie/laravel-translation-loader
.
Requirements
Requires the intl
PHP extension (http://php.net/intl).
Installation
You can install the package via composer:
composer require novius/laravel-backpack-translation-manager
Configure the translation loader
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
Register the service provider
Only for Laravel <= 5.4 :
... in config/app.php
:
'providers' => [
// ...
Novius\Backpack\Translation\Manager\Providers\TranslationServiceProvider::class,
]
[Optional] Integrate in Backpack's sidebar
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>
Usage
@todo
Todos
- Handle pluralization
- Extract vendor dictionaries (via namespace)
- Write Usage section in README