root_rzbn / translator
Admin can translate everything.
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:projects
This package is not auto-updated.
Last update: 2025-05-08 05:07:40 UTC
README
Translation
This package allows you to manage your website translation via admin. You can create a new language, Keys and values, then publish it and write it in language files.
Installation
composer require root_rzbn/translation
Laravel 7 uses Package Auto-Discovery, so you are not required to add ServiceProvider manually.
Laravel 7+
If you don't use Auto-Discovery, add the ServiceProvider to the providers array in config/app.php
file
root_rzbn\translate\TranslatorServiceProvider::class,
Default Filters Namespace
The default namespace for all filters is App\EloquentFilters\
with the base name of the Model.
For example:
Suppose we have a User model with an AgeMoreThan filter.As a result, the namespace filter must be as follows:
With Config file
You can optionally publish the config file with:
php artisan vendor:publish --provider="root_rzbn\translate\ServiceProvider" --tag="config"
And set the namespace for your model filters which will reside in:
return [ /* |-------------------------------------------------------------------------- | Eloquent Filter Settings |-------------------------------------------------------------------------- | | This is the namespace all you Eloquent Model Filters will reside | */ 'namespace' => 'root_rzbn\\translate\\', ];
Usage
.....
Publish styles
php artisan vendor:publish --provider="root_rzbn\translate\ServiceProvider" --tag="assets"
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email srouzbahani35@gmail.com instead of using the issue tracker.
License
translation is released under the MIT License. See the bundled LICENSE file for details.
Built with ❤️ for you.