downtoworld/filament-multilanguage

Laravel Filament Plugin for Translations

dev-main 2024-05-03 11:40 UTC

This package is auto-updated.

Last update: 2024-10-08 02:15:42 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package aims to auto-discover most of the places that should be translated from your Filament application.

Then it also lets you translate them directly from the UI while using a cache driver so there is no performance issues.

Installation

You can install the package via composer:

composer require "downtoworld/filament-multilanguage:dev-main"

You can add the plugin to your panel (normally AdminPanelProvider):

use DTW\FilamentMultilanguage\FilamentMultilanguagePlugin;

$panel
    ...
    ->plugin(new FilamentMultilanguagePlugin)
    ...

You can publish and run the migrations with:

php artisan vendor:publish --tag="filament-multilanguage-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="filament-multilanguage-config"

This is the contents of the published config file:

return [
    'languages' => ['en', 'es', 'fr'], // CONFIGURE YOUR AVAILABLE LOCALES HERE
    'authorized_emails' => [
        //user@user.com INSERT YOUR EMAILS HERE
    ]
];

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.