Download the PHP package rodrigofs/filament-smart-translate without Composer

On this page you can find all versions of the php package rodrigofs/filament-smart-translate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-smart-translate

Filament Smart Translation

Tests PHPStan Code Style

License Packagist Downloads Filament v4 Laravel PHP

Complete translation solution for Filament v4 that provides automatic translation for all components with zero configuration, plus a powerful translation management interface for development.

✨ Features

📦 Installation

1. Install Package

2. Publish Configuration (Optional)

3. Check Status

🚀 Quick Start

1. Set Your Locale

2. Create Translation Files

3. Add Traits to Resources, Pages & Clusters

Only for Resources, Pages, and Clusters - other components work automatically:

That's it! Your Filament interface will now display translated labels automatically.

🎯 How It Works

✅ Automatic (No Code Changes)

These components work instantly with zero configuration:

🔧 Trait Required

These components need one trait per class:

Component Automatic Trait Required
Form Fields ✅ Yes ❌ No
Table Columns ✅ Yes ❌ No
Actions ✅ Yes ❌ No
Layout ✅ Yes ❌ No
Resources ❌ No ✅ Yes
Pages ❌ No ✅ Yes
Clusters ❌ No ✅ Yes

📱 Translation Manager (Development Feature)

The package includes a powerful translation management interface for development environments.

⚠️ Important: Development Only

The Translation Manager should only be used in development environments to avoid Git conflicts during production deployments.

The Problem: The manager modifies JSON translation files directly. When you pull updates from Git to your production server, these local changes will conflict with incoming changes, potentially causing deployment failures or requiring manual conflict resolution during git pull operations.

use Filament\Pages\Page;use Rodrigofs\FilamentSmartTranslate\Traits\Page\PageTranslateble;

🔧 Enable Translation Manager

1. Register the Plugin

Add the TranslationPlugin to your Filament panel:

2. Configure the Translation Manager

Add to your configuration:

📸 Translation Manager Features

Translation Manager interface showing the translation editing capabilities

🌐 Multi-language Interface

📊 Statistics Dashboard

💾 Backup & Export

🔍 Search Functionality

🛡️ Production Alternative

If you must use the Translation Manager in production:

  1. Remove translation files from Git tracking:

  2. Configure for production:

  3. Use environment variable:

⚠️ Recommendation: Keep the Translation Manager in development only to avoid Git conflicts during production deployments (git pull operations).

🎛️ Fallback Strategies

When translations are missing, the package applies intelligent fallback strategies:

Built-in Strategies

1. original (Default)

Keeps the original key format:

2. humanize

Converts to human-readable format:

3. lower_case

Converts to lowercase with hyphens:

Component-Specific Configuration

Custom Strategies

Create your own fallback strategy:

Register in configuration:

🌍 Translation Structure

Recommended: Component-Prefixed Keys

Alternative: Direct Keys

Resolution Order

  1. Component-prefixed key (resources.user)
  2. Direct key (user)
  3. Fallback strategy result

📊 Status Command

Get a complete overview of your setup:

Shows:

Example output:

💡 Complete Example

Resource with Translation Trait

Translation File

Result: Complete Portuguese interface with intelligent fallbacks!

🔧 Configuration

Full configuration options:

🔧 Troubleshooting

Translations Not Showing?

  1. Check locale: Verify config/app.php locale setting
  2. Clear cache: Run php artisan config:clear
  3. Add traits: Resources/Pages/Clusters need traits
  4. Check files: Ensure translation files exist
  5. Run status: Use php artisan filament-smart-translate:status

Resources/Pages/Clusters Not Translating?

Add the required traits:

Translation Manager Not Working?

  1. Register the plugin: Add TranslationPlugin::make() to your Filament panel
  2. Enable in config: Set translation_page.enabled => true
  3. Check authorization: Verify authorize callback
  4. Development mode: Ensure you're in development environment
  5. Clear cache: Run php artisan config:clear

Git Conflicts During Production Deployment?

The Issue: Translation Manager changes create local modifications that conflict with git pull during production updates.

Recommended Solution: Use Translation Manager only in development.

Alternative for Production Use: Remove translation files from Git tracking:

📖 Requirements

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Run tests: composer test
  4. Submit a pull request

📝 License

MIT License - see LICENSE file.

🙏 Acknowledgements


Made with ❤️ for the Filament community

GitHub stars


All versions of filament-smart-translate with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^v4.0
spatie/laravel-package-tools Version ^1.15.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rodrigofs/filament-smart-translate contains the following files

Loading the files please wait ...