Using Summernote Localization files with WonderCMS 3.1.4

Post Reply
User avatar
c0mp0ser
Posts: 67
Joined: Mon Jan 02, 2017 11:59 am

Using Summernote Localization files with WonderCMS 3.1.4

Post by c0mp0ser »

I'm currently testing WonderCMS version 3.1.4. I needed Summernote to be displayed in a language other than English. How to do it? Below is a tutorial.
1. Download the Summernote language file eg from this site:
https://github.com/summernote/summernot ... velop/lang
Click on the language of your choice, copy the entire code, paste it into the ordinary text editor and save it as a file with the same name that appears on the list at the above site address, eg:

Code: Select all

summernote-pl-PL.js
.
2. Create a subfolder in WonderCMS: /plugins/summernote-editor/ named "lang"

Code: Select all

/plugins/summernote-editor/lang
and copy the above created language file there.
3. In the file:

Code: Select all

/plugins/summernote-editor/js/admin.js
, after line 4 containing "airMode: false,", add a new line and enter:

Code: Select all

 lang: 'pl-PL',

into it (see file name mentioned in the first part of this tutorial). Don't forget the decimal point at the end of this line (!).
4. In the file:

Code: Select all

/plugins/summernote-editor/summernote-editor.php 
add a new line after line 45 and write

Code: Select all

<script src="{$Wcms->url('plugins/summernote-editor/lang/summernote-pl-PL.js')}" type="text/javascript"></script>
Remeber to use a proper file name in this code (the name of choosen language file from the part one of this tutorial)

From now on, the editor will be displayed in all WonderCMS in the language choosed by you.
It's just me, an unmeasurable particle of the cosmos ...
https://pawelkruzel.m00n.link
https://m00n.link
https://materialize-wcms.m00n.link
Post Reply