PHP code example of mahmoud217tr / auto-files-localizer

1. Go to this page and download the library: Download mahmoud217tr/auto-files-localizer 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/ */

    

mahmoud217tr / auto-files-localizer example snippets


'dynamic' => [
    # Controls if the dynamic mode should work or not on non-production environments
    'enabled' => (bool) env('AUTO_LOCALIZER_ENABLED', false), 
    # Controls if the dynamic mode should work or on production environment (compined with the previous option)
    'production' => false,
],

'extraction' => [
    # The directories where the translation scanner will scan
    'directories' => [
        'resources/views',
    ],
    # The file patterns that the translation scanner will scan
    'patterns' => [
        '*.php'
    ],
    # The translation functions or directives that scanner will detect (you should add your custom functions here)
    'functions' => [
        '__',
        'trans',
        '@lang',
    ],
],
bash
php artisan vendor:publish --tag="auto-files-localizer-config"
shell
php artisan localizer:extract ar