Skip to content

A Codeigniter4 package for translating your PHP software to other languages. Primarily in the Bengali language. Looking for some open-source contributors from different countries to make this package more effective with any language.

Notifications You must be signed in to change notification settings

robinNcode/ci_onubadok

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Onubadok: A localisation tool for laravel projects

Localize your laravel project with ease using onubadok.

Installation

composer require robinncode/ci_onubadok

Usage

  • To generate language files run the following command

    php spark onubadok:generate your_language_code
    

    Example

    php spark onubadok:generate bn
    

    This will generate a necessary files on as app/Language/en and app/Language/bn. Now you can translate the file and save it.

  • To publish the Controller file run the following command

    php spark onubadok:publish
    

    This will publish the controller file to app/Controllers/OnubadokController.php. Now you can use the controller to get the translated text. Also append the following line to your app/Config/Routes.php file

    $routes->get('onubadok/change/{lang}', 'OnubadokController::change/$1');
    

Using in views file

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.

<?= lang('your_key') ?>

Example

Here is an example of a data table column name. Here data_table is the file name and Name is the key.

<?= lang('data_table.Name') ?>

License

This package is open-sourced software licensed under the MIT license.

Contribution

Feel free to contribute to this project. Any kind of contribution is welcome.

Author

MsM Robin msmrobin518@gmail.com

About

A Codeigniter4 package for translating your PHP software to other languages. Primarily in the Bengali language. Looking for some open-source contributors from different countries to make this package more effective with any language.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages