ONLYOFFICE interface in Chinese and onlyoffice in Chinese

Source: Internet
Author: User
Tags onlyoffice

ONLYOFFICE interface in Chinese and onlyoffice in Chinese

Http://blog.csdn.net/hotqin888/article/details/79337881

The above link also describes how to develop and develop the SDK.

I developed document management using golang's beego framework to implement real-time document collaboration.

First, install docker, then pull the document server image, then the Chinese interface, and finally use golang to provide the echo and storage of the edited documents.

Step 1: delete the files in the container and replace the fonts in windows.

Delete all files under the container/usr/share/fonts. Then run script: documentserver-generate-allfonts.sh and then clear the browser cache.

// Enter the container (running image) and delete other files and folders except truetype in/usr/share/fonts.

$ Dockerexec-it 38e27/bin/bash

Root @ 38e27823ae92:/# dir or ls-al

 

Root @ 6dfa5705aaef :~ # Cd/usr/share/fonts/

Root @ 6dfa5705aaef:/usr/share/fonts # ls

Truetype X11

// Delete the folder X11

Root @ 6dfa5705aaef:/usr/share/fonts # rm-R dir X11

Rm: cannot remove dir: No such file or directory

Root @ 6dfa5705aaef:/usr/share/fonts # ls

Truetype

Root @ 6dfa5705aaef:/usr/share/fonts # cd truetype

Root @ 6dfa5705aaef:/usr/share/fonts/truetype # ls-al

Root @ 6dfa5705aaef:/usr/share/fonts/truetype # ls-al

Total462392

Drwxr-xr-x11 root 4096 Feb 19.

..................

// Delete all objects in the trutype folder except the custome folder

Root @ 6dfa5705aaef:/usr/share/fonts/truetype # rm-R dir *.*

Rm: cannot remove dir: No such file or directory

Root @ 6dfa5705aaef:/usr/share/fonts/truetype # rm-R dir *

Rm: cannot remove dir: No such file or directory

Rm: cannot remove custom: Device or resource busy

Root @ 6dfa5705aaef:/usr/share/fonts/truetype # ls

Custom

Root @ 6dfa5705aaef:/usr/share/fonts/truetype # ls-al

Total 12

Drwxr-xr-x10 root 4096 Feb 19.

Drwxr-xr-x 6 root 4096 Feb 19 10:12 ..

Drwxr-xr-x 2 root 4096 Feb 19 48 m

......

 

Root @ 6dfa5705aaef:/usr/share/fonts/truetype # exit

Exit

 

Administrator @ 604tfalndkdk1_cmingw64 ~ /Winfont

// Copy all the fonts in the winfont folder under the current folder C: \ Users \ Administrator \ to the container Folder/usr/share/fonts/truetype

$ Tar-cv * | docker exec-I 6df tar x-C/usr/share/fonts/truetype

Kaiu. ttf

Msjh. ttc

Msjhbd. ttc

Msjhl. ttc

Msyh. ttc

Msyh. ttf

Msyhbd. ttc

Msyhl. ttc

Simfang. ttf

Simhei. ttf

Simkai. ttf

Simli. ttf

Simsun. ttc

Simsunb. ttf

Simyou. ttf

......

 

Administrator @ 604tfalndkdk1_cmingw64 ~ /Winfont

// Enter the container

$ Dockerexec-it 6df/bin/bash

Root @ 6dfa5705aaef:/# sudo mkfontscale

Root @ 6dfa5705aaef:/# sudo mkfontdir

Root @ 6dfa5705aaef:/# sudo fc-cache-fv

/Usr/share/fonts: caching, new cache contents: 0 fonts, 1 dirs

............

Fc-cache: succeeded

Root @ 6dfa5705aaef:/# exit

Exit

// Exit the container

Administrator @ 604tfalndkdk1_cmingw64 ~ /Winfont

$ Dockerexec 6df/usr/bin/documentserver-generate-allfonts.sh

GeneratingAllFonts. js, please wait... Done

Onlyoffice-documentserver: docservice: stopped

Onlyoffice-documentserver: docservice: started

Onlyoffice-documentserver: converter: stopped

Onlyoffice-documentserver: converter: started

 

If you do not use the dockerrun command after the machine is restarted, use dockerstart

The specific steps are shown in the following figure:


Set "lang": "zh-CN ",

[Html]View plain copy
  1. "EditorConfig ":{
  2. "CallbackUrl": "http: // 192.168.99.1/url-to-callback? Id = {. Doc. Id }}",
  3. "User ":{
  4. "Id": "{. Uid }}",
  5. "Name": "{. Uname }}"
  6. },
  7. "Lang": "zh-CN", // "en-US ",
  8. },

For detailed code, see http://blog.csdn.net/hotqin888/article/details/79337881

Https://github.com/3xxx/EngineerCMS



View comments

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.