Dominus77 / yii2-tinymce-widget

TinyMCE 4 widget for Yii2.
MIT License
8 stars 0 forks source link

Failed to load language file #2

Closed polinwei closed 7 years ago

polinwei commented 7 years ago

Hi Sir:

When I set up the language to 'zh_TW' , I got the error message , But I see the folder: languages_pack has this file : zh_TW.js . How can I configure it ? Thanks help.

Failed to load plugin url: http://.../assets/c5aabaa6/plugins/fontawesome/langs/zh_TW.js

<?= $form->field($model, 'content')->widget(\dominus77\tinymce\TinyMce::className(), [    
    'options' => [
        'rows' => 25
    ],
        'language' => 'zh_TW',
        'clientOptions' => [
                'theme' => 'modern',
                'plugins' => [
                        "advlist autolink lists link image charmap print preview hr anchor pagebreak",
                        "searchreplace wordcount visualblocks visualchars code fullscreen",
                        "insertdatetime media nonbreaking save table contextmenu directionality",
                        "emoticons template paste textcolor colorpicker textpattern imagetools codesample toc fontawesome noneditable",
                ],
                'noneditable_noneditable_class' => 'fa',
                'extended_valid_elements' => 'span[class|style]',
                'toolbar1' => "undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
                'toolbar2' => "print preview media | forecolor backcolor emoticons fontawesome | codesample",
                'image_advtab' => true,
                'templates' => [
                        [
                                'title' => 'Test template 1',
                                'content' => 'Test 1',
                        ],
                        [
                                'title' => 'Test template 2',
                                'content' => 'Test 2',
                        ]
                ],
                'content_css' => [
                        '//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
                        '//www.tinymce.com/css/codepen.min.css',
                        '//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'
                ]
        ],
        'fileManager' => [
                'class' => \dominus77\tinymce\components\MihaildevElFinder::className(),
                'controller' => 'elfinder',
                'title' => 'My File Manager',
                'width' => 900,
                'height' => 400,
                'resizable' => 'yes',
        ],

]);?>

Dominus77 commented 7 years ago

Hello! The fontawesome and sh4tinymce plugins built into yii2-tinymce-widget do not support zh_TW. You can make the transfer yourself and send it to me, I will add it. Whatever the error, disable the fontawesome and sh4tinymce plugins.

You can not disable these plugins, but they will be in English. You can translate them and send them to me, I'll replace them.

To use them, perform the composer update to update to version 1.2.5

polinwei commented 7 years ago

Hello!! Here you are. Thanks for your quickly reply.

tinymce.addI18n('zh_TW', { 'Icons': '圖標', 'Web Application': 'Web 應用程式', 'File Type': '檔案類型', 'Spinner': '微調', 'Form Control': '表單控制', 'Currency': '貨幣', 'Text Editor': '文件編輯器', 'Directional': '方向', 'Video Player': '視頻播放器', 'Brand': '品牌', 'Medical': '醫學', 'Transportation': '運輸', 'Gender': '性別', 'Payment': '付款', 'Chart': '圖表', 'Hand': '手', 'Search': '搜尋', 'No icons matched your search': '沒有符合您搜索的圖標' });