Translates Laravel language files to Dhivehi
You can install the package via composer:
composer require javaabu/laravel-dhivehi-translate
Laravel 5.5 and above uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.
After updating composer, add the ServiceProvider to the providers array in config/app.php
Javaabu\LaravelDhivehiTranslate\LaravelDhivehiTranslateServiceProvider::class,
This package essentially creates a Microsoft Translator driver for tanmuhittin/laravel-google-translate package using the InputOutputZ/ATran package.
So this package will publish modified versions of config files from those packages named atran.php
and laravel_google_translate.php
.
php artisan vendor:publish --force --provider="Javaabu\LaravelDhivehiTranslate\LaravelDhivehiTranslateServiceProvider"
AZURETRAN_KEY=xxxxxxxxxxxxxx
Follow this link to get API key.
Then you can run
php artisan translate:files
See it on action:
This package provides two translation methods for Laravel helper Str
Illuminate\Support\Str::apiTranslate
-> Translates texts using your selected api in configIlluminate\Support\Str::apiTranslateWithAttributes
-> Again translates texts using your selected api in config in addition to that this function respects Laravel translation text attributes like :name
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email info@javaabu.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.