- Requirements
- Usage
- 1. inputGujaratiInteger($model)
- 2. outputGujaratiInteger($data)
- 3. filterGujaratiInteger($model)
- 4. forUpdateBanglaInteger($model)
- Resources
...overview of the extension...
Requirements ¶
...requirements of using this extension (e.g. Yii 1.1 or above)...
Usage ¶
...how to use this extension...
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.Gujarati.*',
),
This module has four functions,
inputGujaratiInteger($model)
outputGujaratiInteger($data)
filterGujaratiInteger($model)
forUpdateGujaratiInteger($model)
1. inputGujaratiInteger($model) ¶
this function is used for translating Gujarati 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'];
GujaratiModule::inputGujaratiInteger($model);
2. outputGujaratiInteger($data) ¶
this function is used for translate English data (int and float) from DB to Gujarati 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' => 'GujaratiModule::outputGujaratiInteger($data->id);',
),
array(
'class' => 'CButtonColumn',
),
),
));
3. filterGujaratiInteger($model) ¶
this function is used to support user to search data with Gujrati 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; GujaratiModule::filterGujaratiInteger($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){ GujaratiModule::forUpdateGujaratiInteger($model);
}
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.