khrdev/awt is a Laravel package for awesome translation for laravel.
It currently has 0 GitHub stars and 67 downloads on Packagist (latest version v1.1).
Install it with composer require khrdev/awt.
Discover more Laravel packages by khrdev
or browse all Laravel packages to compare alternatives.
Last updated
![AWT] Create Laravel Lang file for current locale and translate the keys from google
Laravel Awesome Translation Helper using Google Translation
// Generate translation file based in current app locale
awtTrans('Hello World !')
Require this package, with Composer, in the root directory of your project.
$ composer require khrdev/awt
Add the service provider to config/app.php in the providers array, or if you're using Laravel 5.5, this can be done via the automatic package discovery.
khrdev\awt\AWTServiceProvider::class,
Publish package config file "awt.php" to access new customize features
php artisan vendor:publish --provider=khrdev\awt\AWTServiceProvider
You can use helper function to get the trans key or generate it if not found
awtTrans('Hello World !')
In view you can use it like this
{{awtTrans('Hello World !')}}
You can use our blade directive for fast translation
@awt('Hello World !')
You can customize the locale by adding it as a second argument
awtTrans('Hello World !', 'ar')
{{awtTrans('Hello World !', 'ar')}}
@awt('Hello World !', 'ar')