PHP code example of nikaia / translation-sheet

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

    

nikaia / translation-sheet example snippets


    Nikaia\TranslationSheet\TranslationSheetServiceProvider::class,
    

[
    // ...
    
    'exclude' => [
        'validation*',  // This will exclude all the `validation.php` translations.
        'foo::*',       // This will exclude all the `foo` namespace translations.
        'foo::bar.*',   // this will exclude the `bar` translations from the `foo` namespace.
    ],
    
    // ...
]

[
    // ...

    'extra_sheets' => [
        [
            'name' => 'Web App',                        // Spreadsheet sheet (tab) name.
            'path' => resource_path('web-app/lang'),    // Path where json files are stored. Files can be organized inside sub folders.        
            'tabColor' => '#0000FF',                    // Color of the spreadsheet tab
        ],
        [
            'name' => 'Mobile App',
            'path' => resource_path('mobile-app/lang'),        
            'tabColor' => '#0000FF',
        ],    
    ],
]
bash
    $ php artisan translation_sheet:publish
        or
    $ php artisan vendor:publish --provider="Nikaia\TranslationSheet\TranslationSheetServiceProvider"
    
bash
$ php artisan translation_sheet:setup
bash
$ php artisan translation_sheet:prepare
bash
$ php artisan translation_sheet:lock
bash
$ php artisan translation_sheet:pull
bash
$ php artisan translation_sheet:unlock
bash
$ php artisan translation_sheet:open