A quick interface to edit language files, for Laravel Backpack.
Subscribe to the Mailchimp list to be up to date with the community.
$ composer require backpack/langfilemanager
In your config/app.php, add this to the providers array:
Backpack\LangFileManager\LangFileManagerServiceProvider::class,
$ php artisan migrate --path=vendor/backpack/langfilemanager/src/database/migrations
$ php artisan db:seed --class="Backpack\LangFileManager\database\seeds\LanguageTableSeeder"
$ php artisan vendor:publish --provider="Backpack\LangFileManager\LangFileManagerServiceProvider" --tag="config" #publish the config file
$ php artisan vendor:publish --provider="Backpack\LangFileManager\LangFileManagerServiceProvider" --tag="lang" #publish the lang files
// TODO: change variable to "protected_lang_files" or smth like that
Tell LangFileManager what langfiles NOT to show, in config/backpack/langfilemanager.php:
// Language files to NOT show in the LangFileManager
//
'language_ignore' => ['admin', 'pagination', 'reminders', 'validation', 'log', 'crud'],
Add a menu item for it in resources/views/vendor/backpack/base/inc/sidebar.blade.php:
<li class="treeview">
<a href="#"><i class="fa fa-globe"></i> <span>Translations</span> <i class="fa fa-angle-left pull-right"></i></a>
<ul class="treeview-menu">
<li><a href="{{ url('admin/language') }}"><i class="fa fa-flag-checkered"></i> Languages</a></li>
<li><a href="{{ url('admin/language/texts') }}"><i class="fa fa-language"></i> Site texts</a></li>
</ul>
</li>
or in menu.blade.php:
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
<i class="fa fa-globe"></i> Translations<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li class=""><a href="{{ url('admin/language') }}"><i class="fa fa-flag-checkered"></i> Languages</a></li>
<li class=""><a href="{{ url('admin/language/texts') }}"><i class="fa fa-language"></i> Site texts</a></li>
</ul>
</li>
Or just try at your-project-domain/admin/language/texts
See http://laravelbackpack.com
Please see CHANGELOG for more information what has changed recently.
// TODO
$ composer test
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] or [email protected] instead of using the issue tracker.
- Alin Ghitu - author
- Cristian Tabacitu - contributor
- All Contributors
The MIT License (MIT). Please see License File for more information.