fjudith / docker-draw.io

Dockerized draw.io based on tomcat:9-jre11 & tomcat:9-jre8-alpine official image.
Apache License 2.0
408 stars 480 forks source link

Can I increase en environment variable to make the docker container support the default language setting? #54

Closed hellodk34 closed 2 years ago

hellodk34 commented 2 years ago

Just like the title, if not, would you consider supporting this feature.

thanks for developing this!

hellodk34 commented 2 years ago

Ohhh, I found this way to achieve my needs.

Into the container( docker exec -it CONTAINER_NAME bash ), and edit this file: /usr/local/tomcat/webapps/draw/index.html

go to line 39 (may be not very accurate), found this line, code like this: var urlParams = (function()

before return result;

add following code:

result['lang'] = 'zh'; // 开启默认中文
result['browser'] = '1'; // 开启浏览器缓存
result['mode'] = 'browser'; // 默认使用浏览器缓存

save this file and exit container and restart this container, and then works!

xxx

Thanks this post