Yii 1.1: banglasupportmodule

For Bangla Input and Bangla Output on DB

In DB int and float dataTypes are no supported bangla, so users has to input other info in bangla, but in case of those fields whiches are from dataTypes int and float, they have to put them with English. With this module, the user can also input the int and float dataTypes data in Bangla.

(Bangla is my mother language. I love it. )


...requirements of using this extension (e.g. Yii 1.1 or above)...


...You Must Disable ajaxvalidation for associative _form.php


...how to use this module...

...to use this module, extract it to your protected/modules/ folder...

and import it to your main.php config file as,

'import' => array(

This module has four functions,

  1. inputBanglaInteger($model)
  2. outputBanglaInteger($data)
  3. filterBanglaInteger($model)
  4. forUpdateBanglaInteger($model)

1. inputBanglaInteger($model)

this function is used for translating Bangla input (int and float) to English and takes the associative model as parameter.

put this function in your controller's create and update actions, after the line,

if (isset($_POST['YourModel'])) {
            $model->attributes = $_POST['YourModel'];


if (isset($_POST['YourModel'])) {
            $model->attributes = $_POST['YourModel'];

2. outputBanglaInteger($data)

this function is used for translate English data (int and float) from DB to Bangla for display and takes a model->value as parameter.

add this function in your CGridView columns in your application's views/admin.php file as,

$this->widget('zii.widgets.grid.CGridView', array(
        'id' => 'your-model-grid',
        'dataProvider' => $model->search(),
        'filter' => $model,
        'columns' => array(
                'name' => 'id',
                'type' => 'raw',
                'value' => 'TanimBanglaModule::outputBanglaInteger($data->id);',                
                'class' => 'CButtonColumn',

3. filterBanglaInteger($model)

this function is used to support user to search data with Bangla in the search fields in CGridView and takes the associative model as parameter.

put this function in your model's search(), after

$criteria = new CDbCriteria;


$criteria=new CDbCriteria;

4. forUpdateBanglaInteger($model)

this function is used for display data from DB in Bangla in associative fields when update a specific row of DB.

put this function at the top of your view/_form.php file, like,


Total 4 comments

#9338 report it
tanimgt at 2012/08/04 02:58pm
I didnt understand

abhishek2890 , bro what you saying , i cannt understand it. can you re post your problem or suggestion please ?

#9224 report it
Abhishek Shah at 2012/07/30 06:44am
models &m components folder is empty

u have import it,but not in attachment,is it necessary?

#6398 report it
masum at 2012/01/07 12:47am
Good job

We appreciate your effort .... keep it live

#6397 report it
tanimgt at 2012/01/06 11:50pm
Need some reply

there is a say, "Something is Better then Nothing"

Leave a comment

Please to leave your comment.

Create extension
  • Yii Version: 1.1
  • License: Other Open Source License
  • Developed by: tanimgt
  • Category: User Interface
  • Votes: +6
  • Downloaded: 280 times
  • Created on: Jan 6, 2012
  • Last updated: Jan 14, 2012
  • Tags: module