crayon / nova-language-management

A Laravel Nova tool that helps you implement dynamic languages.

Stars
5

Laravel Nova Langauge Management

A tool for Laravel Nova to implement dynamic languages. The whole idea of this package is to rewrite the configuration files of several localization packages based on your inputs.

Installation

Use the package manager composer to install this tool.

composer require crayon/nova-language-management

Usage

Open up NovaServiceProvider and register the tool in the tools method

/**
 * Get the tools that should be listed in the Nova sidebar.
 *
 * @return array
 */
public function tools()
{
    NovaLanguageEditor::make();
}

Permissions

    NovaLanguageEditor::make()->canSee(fn($request) => $request->user()->isSuperAdmin()),

Clarification

This tool is uses
Nova Translatable
Macamara Laravel Localization
Nova Translation Editor

If you do not have them installed it will install them for you. Also, make sure to publish the configuration files:

php artisan vendor:publish --provider="Mcamara\LaravelLocalization\LaravelLocalizationServiceProvider"
php artisan vendor:publish --tag="nova-translatable-config"
php artisan vendor:publish --provider="Bernhardh\NovaTranslationEditor\ToolServiceProvider"

Migration

Publish language_lines (Nova Translation Editor) migration

php artisan vendor:publish --provider="Spatie\TranslationLoader\TranslationServiceProvider" --tag="migrations"
php artisan migrate

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Screenshots

Nova language management

License

MIT