Skip to content

FilamentPHP plugin to load and manage your app's translations.

Notifications You must be signed in to change notification settings

ptrck0/language-panel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Language-panel

A FilamentPHP plugin to load and manage translations with.

This package does three things:

  1. Loads translations from your lang/ directory, and uses Spatie's translation loader to store and read your data.
  2. Provides you with a filament admin panel plugin to manage the loaded translations.
  3. Provides you with the option to download the translations in excel format, edit them, and upload them again.

Screenshots

index upload import

Installation

  • Install this package: composer require patrick/language-panel
  • Add Spatie's translation loader to your config/app.php file:
    'providers' => Illuminate\Support\ServiceProvider::defaultProviders()
        ->replace([
            Illuminate\Translation\TranslationServiceProvider::class => Spatie\TranslationLoader\TranslationServiceProvider::class,
        ])->toArray(),
  • Publish the migrations of Spatie's package and run them:
php artisan vendor:publish --provider="Spatie\TranslationLoader\TranslationServiceProvider" --tag="migrations"
php artisan migrate
  • Load your translations using artisan: php artisan language-panel:import.
  • Publish the configuration assets to customize which functions of the panel can be used: php artisan vendor:publish --tag=language-panel-config.
  • Publish the translations if you would like to adjust them: php artisan vendor:publish --tag=language-panel-lang.

Usage

Register the following plugin in your admin panel: Patrick\LanguagePanel\LanguagePanel:make()

The panel will now be available at /language-lines, you can edit lines here that you have imported.

Todo

  • Support vendor lines

Great alternatives

About

FilamentPHP plugin to load and manage your app's translations.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages