https://github.com/tomatophp/filament-language-switcher
Switch between languages on your app using user base column on database
https://github.com/tomatophp/filament-language-switcher
filament filament-plugin languages laravel multi-language switcher tomatophp
Last synced: 11 months ago
JSON representation
Switch between languages on your app using user base column on database
- Host: GitHub
- URL: https://github.com/tomatophp/filament-language-switcher
- Owner: tomatophp
- License: mit
- Created: 2024-10-23T12:11:44.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-06-16T22:27:38.000Z (about 1 year ago)
- Last Synced: 2025-06-29T20:45:30.156Z (12 months ago)
- Topics: filament, filament-plugin, languages, laravel, multi-language, switcher, tomatophp
- Language: PHP
- Homepage: https://tomatophp.com/en/open-source/filament-language-switcher
- Size: 1010 KB
- Stars: 22
- Watchers: 2
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README

# Filament Language Switcher
[](https://github.com/tomatophp/filament-language-switcher/actions/workflows/dependabot/dependabot-updates)
[](https://github.com/tomatophp/filament-language-switcher/actions/workflows/fix-php-code-styling.yml)
[](https://github.com/tomatophp/filament-language-switcher/actions/workflows/tests.yml)
[](https://packagist.org/packages/tomatophp/filament-language-switcher)
[](https://packagist.org/packages/tomatophp/filament-language-switcher)
[](https://packagist.org/packages/tomatophp/filament-language-switcher)
Switch between languages on your app using user base column on database
## Screenshots



## Installation
```bash
composer require tomatophp/filament-language-switcher
```
after install your package please run this command
```bash
php artisan filament-language-switcher:install
```
finally register the plugin on `/app/Providers/Filament/AdminPanelProvider.php`
```php
->plugin(\TomatoPHP\FilamentLanguageSwitcher\FilamentLanguageSwitcherPlugin::make())
```
now on your `User.php` model or any user model add this trait
```php
use \TomatoPHP\FilamentLanguageSwitcher\Traits\InteractsWithLanguages;
```
now you must see the switcher and you can change language as you like
## Publish Assets
you can publish config file by use this command
```bash
php artisan vendor:publish --tag="filament-language-switcher-config"
```
you can publish views file by use this command
```bash
php artisan vendor:publish --tag="filament-language-switcher-views"
```
you can publish languages file by use this command
```bash
php artisan vendor:publish --tag="filament-language-switcher-lang"
```
you can publish migrations file by use this command
```bash
php artisan vendor:publish --tag="filament-language-switcher-migrations"
```
## Testing
if you like to run `PEST` testing just use this command
```bash
composer test
```
## Code Style
if you like to fix the code style just use this command
```bash
composer format
```
## PHPStan
if you like to check the code by `PHPStan` just use this command
```bash
composer analyse
```
## Other Filament Packages
Checkout our [Awesome TomatoPHP](https://github.com/tomatophp/awesome)