0

i used use dosamigos\ckeditor\CKEditor in my project in yii2 i want change language of ckeditor in config !

how can i solve my problem?

this is my code in _form.php

<?php

use dosamigos\ckeditor\CKEditor;
   <?=
    $form->field($model, 'text')->widget(CKEditor::className(), [
        'options' => ['rows' => 6],
//        'language' => 'fa',
        'preset' => 'full'
    ])
    ?>
Saltern
  • 1,305
  • 2
  • 16
  • 42

1 Answers1

2

You have to use clientOptions property:

$form->field($model, 'text')->widget(CKEditor::className(), [
     'options' => ['rows' => 6],
     'clientOptions' => ['language' => 'fa'],    // here
     'preset' => 'full'
])
Yupik
  • 4,932
  • 1
  • 12
  • 26