1. Go to this page and download the library: Download webo3/laravel-translator library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
return [
// Languages to manage
'languages' => ['en', 'fr'],
// Where JSON language files are stored
'lang_path' => resource_path('lang'),
// Where export files are written (null = same as lang_path)
'export_path' => null,
// Directories to scan for translation keys
'scan_paths' => [app_path(), resource_path()],
// Export format: 'csv' or 'xliff'
'format' => 'csv',
// Translation driver for auto-translate: 'google_free'
'translation_driver' => 'google_free',
// Driver-specific options
'translation_options' => [],
];