Skip to content

devon2018/azure-translate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Lumen Azure translation package

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

About

Lumen / Laravel Azure translation package

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages