<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
chrissantiago82 / laravel-google-translate example snippets
return [
/*
|----------------------------------------------------------------------------------------------------
| The ISO 639-1 code of the language in lowercase to which the text will be translated to by default.
|----------------------------------------------------------------------------------------------------
*/
'default_target_translation' => 'en',
/*
|-------------------------------------------------------------------------------
| Path to the json file containing the authentication credentials.
|
| The process to get this file is documented in a step by step detailed manner
| over here:
| https://github.com/JoggApp/laravel-google-translate/blob/master/google.md
|-------------------------------------------------------------------------------
*/
'api_key' => env('GOOGLE_TRANSLATE_API_KEY'),
];
GoogleTranslate::detectLanguage('Hello world'): array
GoogleTranslate::detectLanguage(['Hello world', 'Laravel is the best']);
// Returns multi-dimensional array containing result set for all the array elements.
GoogleTranslate::translate('Hello world'): array
GoogleTranslate::translate(['Hello world', 'Laravel is the best']);
// Returns multi-dimensional array containing result set for all the array elements.