Download the PHP package tomatophp/filament-translations without Composer
On this page you can find all versions of the php package tomatophp/filament-translations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tomatophp/filament-translations
More information about tomatophp/filament-translations
Files in tomatophp/filament-translations
Package filament-translations
Short Description Manage your translation with DB and cache, you can scan your languages tags like trans(), __(), and get the string inside and translate them use UI.
License MIT
Informations about the package filament-translations
Filament Translations Manager
Manage your translation with DB and cache, you can scan your languages tags like trans()
, __()
, and get the string inside and translate them use UI.
this plugin is build in spatie/laravel-translation-loader
Screenshots
Installation
now run install command
Finally register the plugin on /app/Providers/Filament/AdminPanelProvider.php
Extensions
Allow Create Button to Create New Language
If you want to allow the user to create a new language, you need to add the following to your panel provider:
Allow Clear All Translations Button
If you want to allow the user to clear all translations, you need to add the following to your panel provider:
Use Language Switcher
we move language switcher to another package you can check it Filament Language Switcher
Scan Using Command Line
You can scan your project to get all the languages tags and save them to the database
Change Scan to work on Queue
In your config file just change the use_queue_on_scan
to true
Custom Import Command
You can create your own command to import the translations, add your custom import class to the config file like this:
This command will automatically run when you click on the "Scan For New Languages" button in the UI.
Custom Excel Import
You can create your own Excel import to import the translations, add your custom import class to the config file like this:
The import class is based on the Laravel Excel package. You can check the documentation here. This import will automatically run when you click on the "Import" button in the UI.
Custom Excel Export
You can create your own Excel export to export the translations in your own format, add your custom export class to the config file like this:
The export class is based on the Laravel Excel package. You can check the documentation here. This import will automatically run when you click on the "Export" button in the UI.
Show or hide buttons in the UI
You can show or hide the buttons in the UI by changing the config file. By default, all buttons are shown.
Custom Resource
You can create your own resource to show the translations in the UI, add your custom resource class to the config file like this:
This is especially useful when you want to have complete control over the UI but still want to use the translations package. Think about implementing a check on user roles when using shouldRegisterNavigation
in your custom resource.
Translation Translations Resource Hooks
we have add a lot of hooks to make it easy to attach actions, columns, filters, etc
Table Columns
Table Actions
Table Filters
Table Bulk Actions
From Components
Page Actions
Publish Assets
You can publish views file by use this command:
You can publish languages file by use this command:
You can publish migrations file by use this command:
Other Filament Packages
Checkout our Awesome TomatoPHP
All versions of filament-translations with dependencies
tomatophp/console-helpers Version ^1.1
filament/filament Version ^3.2
filament/notifications Version ^3.2
tomatophp/filament-developer-gate Version ^1.0
spatie/laravel-translation-loader Version ^2.7
tomatophp/filament-translation-component Version ^1.0
maatwebsite/excel Version ^3.1