PHP code example of subotkevic / laravel-json-translation-helper
1. Go to this page and download the library: Download subotkevic/laravel-json-translation-helper 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/ */
subotkevic / laravel-json-translation-helper example snippets
/**
* Directories to scan for missing translation keys.
*/
'scan_directories' => [
app_path(),
resource_path('views'),
resource_path('assets'),
],
/**
* File extensions to scan from.
*/
'file_extensions' => [
'php',
'js',
'vue',
],
/**
* Translation helper methods to scan
* for in your application's code.
*/
'translation_methods' => [
'lang',
'__',
],
php artisan translation:scan
php artisan vendor:publish --provider="JsonTranslationHelper\TranslationHelperServiceProvider"