This is a Composer package for translating your PHP software to other languages, primarily in Bengali.
robinncode/onubadok is a Laravel package for this is a composer package for translating your php software to other languages, primarily in bengali..
It currently has 2 GitHub stars and 816 downloads on Packagist (latest version 1.0.2).
Install it with composer require robinncode/onubadok.
Discover more Laravel packages by robinncode
or browse all Laravel packages to compare alternatives.
Last updated
composer require robinncode/onubadok
To generate language files run the following command
php artisan onubadok:generate your_language_code
php artisan onubadok:generate bn
This will generate a necessary files on as lang/en and lang/bn. Now you can translate the file and save it.
To publish the Controller file run the following command
php artisan onubadok:publish
This will publish the controller file to app/Http/Controllers/OnubadokController.php. Now you can use the controller to get the translated text.
Also append the following line to your routes/web.php file
Route::get('/onubadok/change/{lang}', 'OnubadokController@change');
Now run your project then goto your browser and type http://your_project_url/onubadok/change/your_language_code to change the language to your_language_code. Now you can use the following code to get the translated text.
{{ __( 'Your text' ) }}
Here is an example of a data table column name. Here data_table is the file name and Name is the key.
{{ __( 'data_table.Name' ) }}
This package is open-sourced software licensed under the MIT license.
Feel free to contribute to this project. Any kind of contribution is welcome.
MsM Robin [email protected]