devonray / azuretranslate
There is no license information available for the latest version (1.1.1) of this package.
Create azure translations for lumen
1.1.1
2020-01-26 17:03 UTC
Requires
- php: ^7.2
- ixudra/curl: ^6.16
- league/flysystem: ^1.0
README
Installation
This package requires lumens local file storage to be setup How to setup lumen local strage
composer require devonray/azuretranslate
Add the following to your bootstrap/app.php file to register the service provider
$app->register(Devonray\AzureTranslate\AzureTranslatorServiceProvider::class);
Copy the language file into your config/ directory
add your Azure api key to your enviroment file Get Azure key
AZURE_KEY=secret
add a new storage option to your filesystems.php
'local_r' => [ 'driver' => 'local', 'root' => base_path() ],
!important Make sure the resources/lang/ directory exists
Usage
You can use the packge from the terminal like follows
php artisan translation:create "translation.key" "String to translate"
Adding the "." in the name will split the translations into files e.g user.name will create a line in the user.php translation with the name key
If no "." are present in the string then they get put into the main.php file