root_rzbn/translator

Admin can translate everything.

dev-master 2020-07-21 12:05 UTC

This package is not auto-updated.

Last update: 2024-10-10 02:42:01 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.