- Requirements
- BackThrough
- Usage
- inputBanglaInteger($model)
- 2. outputBanglaInteger($data)
- 3. filterBanglaInteger($model)
- 4. forUpdateBanglaInteger($model)
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 ¶
...requirements of using this extension (e.g. Yii 1.1 or above)...
BackThrough ¶
...You Must Disable ajaxvalidation for associative _form.php
Usage ¶
...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(
'application.modules.TanimBangla.*',
),
This module has four functions,
- inputBanglaInteger($model)
- outputBanglaInteger($data)
- filterBanglaInteger($model)
forUpdateBanglaInteger($model)
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'];
like,
if (isset($_POST['YourModel'])) {
$model->attributes = $_POST['YourModel'];
TanimBanglaModule::inputBanglaInteger($model);
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(
array(
'name' => 'id',
'type' => 'raw',
'value' => 'TanimBanglaModule::outputBanglaInteger($data->id);',
),
array(
'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;
like,
$criteria=new CDbCriteria;
TanimBanglaModule::filterBanglaInteger($this);
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,
if(!$model->isNewRecord){
TanimBanglaModule::forUpdateBanglaInteger($model);
}
Need some reply
Good job
We appreciate your effort .... keep it live
models &m components folder is empty
u have import it,but not in attachment,is it necessary?
I didnt understand
abhishek2890 , bro what you saying , i cannt understand it. can you re post your problem or suggestion please ?
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.