https://github.com/robinncode/ci_onubadok
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.
https://github.com/robinncode/ci_onubadok
cli codeigniter codeigniter-library localization php translation
Last synced: 25 days ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/robinncode/ci_onubadok
- Owner: robinNcode
- Created: 2023-05-22T19:20:50.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-02T03:40:04.000Z (about 3 years ago)
- Last Synced: 2025-07-24T11:41:34.848Z (11 months ago)
- Topics: cli, codeigniter, codeigniter-library, localization, php, translation
- Language: PHP
- Homepage:
- Size: 23.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# 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](https://opensource.org/licenses/MIT).
### Contribution
Feel free to contribute to this project. Any kind of contribution is welcome.
### Author
MsM Robin