PHP code example of gymmed / laravel-package-translator

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

    

gymmed / laravel-package-translator example snippets


return [
  ...
  'datagrid' => [
      'toolbar' => [
          'length-of' => ':length of',
          'results'   => ':total Results',
          'selected'  => ':total Selected',

          'mass-actions' => [
              'must-select-a-mass-action'        => 'You must select a mass action.',
              'must-select-a-mass-action-option' => 'You must select a mass action\'s option.',
              'no-records-selected'              => 'No records have been selected.',
              'select-action'                    => 'Select Action',
          ],
        ...
];

return [
  ...
  'datagrid' => [
    'toolbar' => [
        'length-of' => ' :length iš', /* :length of */
        'results'   => ' :total Rezultatai', /* :total Results */
        'selected'  => ' :total Pasirinkta', /* :total Selected */

        'mass-actions' => [
            'must-select-a-mass-action'        => 'Turite pasirinkti masinį veiksmą.', /* You must select a mass action. */
            'must-select-a-mass-action-option' => 'Turite pasirinkti masinio veiksmo parinktį.', /* You must select a mass action\'s option. */
            'no-records-selected'              => 'Nepasirinkta jokių įrašų.', /* No records have been selected. */
            'select-action'                    => 'Pasirinkite Veiksmas', /* Select Action */
        ],
        ...
];
bash
php artisan package-translator:translate Webkul/Shop en/app lt/app
bash
rootDirectory/packages/Webkul/Shop/src/Resources/lang/en/app.php
bash
php artisan package-translator:translate Webkul/Shop en/app lt/app --comments --force
bash
php artisan package-translator:uncomment Webkul/Shop lt/app