PHP code example of amirami / localizator

1. Go to this page and download the library: Download amirami/localizator 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/ */

    

amirami / localizator example snippets


  Amirami\Localizator\ServiceProvider::class,
  

  public function register()
  {
      if ($this->app->isLocal()) {
          $this->app->register(\Amirami\Localizator\ServiceProvider::class);
      }
      // ...
  }
  



return [

    /**
     * Localize types of translation strings.
     */
    'localize' => [
        /**
         * Short keys. This is the default for Laravel.
         * They are stored in PHP files inside folders name by their locale code.
         * Laravel comes with default: auth.php, pagination.php, passwords.php and validation.php
         */
        'default' => true,

        /**
         * Translations strings as key.
         * They are stored in JSON file for each locale.
         */
        'json'    => true,
    ],

    /**
     * Search criteria for files.
     */
    'search'   => [
        /**
         * Directories which should be looked inside.
         */
        'dirs'      => ['resources/views'],
        
        /**
         * Subdirectories which will be excluded.
         * The values must be relative to the 
bash
php artisan vendor:publish --provider="Amirami\Localizator\ServiceProvider" --tag="config"
 bash
php artisan localize de,fr
 bash
php artisan localize
 bash
php artisan localize --remove-missing