Reputation: 2265
I need to change the word "Text" to "Texto" for the kartik-v/yii2-export widget that generate a text file.
I can change it in the vendor/kartik-v/yii2-export/src/ExportMenu.php
file but I think it is not recommended to change this file.
Upvotes: 0
Views: 537
Reputation: 2265
In the view file:
'exportConfig' => [
ExportMenu::FORMAT_TEXT => [
'label' => 'Texto'
],
ExportMenu::FORMAT_EXCEL => [
'label' => 'Excel 95 o superior'
],
ExportMenu::FORMAT_EXCEL_X => [
'label' => 'Excel 2007 o superior'
],
],
Upvotes: 0
Reputation: 354
Add exportConfig , Change the label
]
ExportMenu::FORMAT_TEXT => [
'label' => Yii::t('kvexport', 'Text'),
'icon' => $isFa ? 'file-text-o' : 'floppy-save',
'iconOptions' => ['class' => 'text-muted'],
'linkOptions' => [],
'options' => ['title' => Yii::t('kvexport', 'Tab Delimited Text')],
'alertMsg' => Yii::t('kvexport', 'The TEXT export file will be generated for download.'),
'mime' => 'text/plain',
'extension' => 'csv',
'writer' => ExportMenu::FORMAT_TEXT
],
.
.
]
Upvotes: 1