PHP code example of nadeesha / laravel-si-localization

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

    

nadeesha / laravel-si-localization example snippets

bash
php artisan vendor:publish --tag=sinhala-lang

bash
// globally (config/app.php)
'locale' => 'si';

// or per-request
app()->setLocale('si')

bash
__('100%'); // ➜ "සියත්ව | හැතප්ම"
__('A');    // ➜ "ක | අ | වරයකු | වරයෙකු | තාවයක්"
__('3D');   // ➜ "ත්‍රිමාණ"
__('ANP');  // ➜ "ඒජාප | ඇන්පී"