yii2-widget-datatables icon indicating copy to clipboard operation
yii2-widget-datatables copied to clipboard

Language Configuration

Open faravaghi opened this issue 9 years ago • 3 comments

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?

faravaghi avatar Nov 23 '15 09:11 faravaghi

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.

fedemotta avatar Nov 23 '15 20:11 fedemotta

For Ajax source will have to do?

        'clientOptions' => [
            'ajax'=>Yii::$app->request->url,
            'serverSide' => true,
        ]

action function in Controller file ?!

faravaghi avatar Nov 25 '15 10:11 faravaghi

for example EDataTable work in yii1.1.x

faravaghi avatar Nov 25 '15 10:11 faravaghi