yii2-widget-datatables
yii2-widget-datatables copied to clipboard
Language Configuration
Hi, Thank you for this extension. How can I do change language of this widget?
i can put language option in view code but i want change it one time and use this config. for example:
...
'clientOptions' => [
'language'=>[
'lengthMenu' => 'Display _MENU_ records per page',
'info'=> 'Showing page _PAGE_ of _PAGES_'
]
],
...
with this solution i have every view file write this and in the update this language i have to update all view files!
what is your solution?
Hi @faravaghi , Why don't you just create some yii2 configuration params with those settings? You could create a "language" params with the configuration array with all the text to be translated.
For Ajax source will have to do?
'clientOptions' => [
'ajax'=>Yii::$app->request->url,
'serverSide' => true,
]
action function in Controller file ?!
for example EDataTable work in yii1.1.x