diff --git a/src/main/java/net/mingsoft/config/I18NConfig.java b/src/main/java/net/mingsoft/config/I18NConfig.java deleted file mode 100644 index 9c02d473..00000000 --- a/src/main/java/net/mingsoft/config/I18NConfig.java +++ /dev/null @@ -1,31 +0,0 @@ -package net.mingsoft.config; - -import com.jagregory.shiro.freemarker.ShiroTags; -import freemarker.template.TemplateException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Configuration; - -import javax.annotation.PostConstruct; -import java.io.IOException; - -/** - * 读取国际化配置,传递给freemker - */ -@Configuration -public class I18NConfig { - @Autowired - protected freemarker.template.Configuration configuration; - - @Value("${ms.local.default:zh_CN}") - private String defaultLocal; - @Value("$ms.local.local-messages:zh_CN,en_US}") - private String localMessages; - - @PostConstruct - public void init() throws IOException, TemplateException { - configuration.setSharedVariable("localDefault",defaultLocal); - configuration.setSharedVariable("localMessages",localMessages.split(",")); - } - -} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 3227c0ed..525f5456 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -15,7 +15,7 @@ logging: ms: local: default: zh_CN #默认语言 - local-messages: zh_CN,en_US #全部语言 + local-language: zh_CN,en_US #全部语言 # scheme: https #解决使用代理服务器代理应用时标签解析域名依旧为http的问题 swagger: enable: true #启用swagger文档,生产的时候务必关掉 diff --git a/src/main/webapp/WEB-INF/manager/cms/category/index.ftl b/src/main/webapp/WEB-INF/manager/cms/category/index.ftl index 5aacd3f8..1fcd1954 100644 --- a/src/main/webapp/WEB-INF/manager/cms/category/index.ftl +++ b/src/main/webapp/WEB-INF/manager/cms/category/index.ftl @@ -34,8 +34,7 @@ @@ -48,7 +47,7 @@ diff --git a/src/main/webapp/WEB-INF/manager/cms/content/main.ftl b/src/main/webapp/WEB-INF/manager/cms/content/main.ftl index 9b42f527..533cf016 100644 --- a/src/main/webapp/WEB-INF/manager/cms/content/main.ftl +++ b/src/main/webapp/WEB-INF/manager/cms/content/main.ftl @@ -63,8 +63,7 @@ @@ -80,8 +79,7 @@ diff --git a/src/main/webapp/WEB-INF/manager/include/local.ftl b/src/main/webapp/WEB-INF/manager/include/local.ftl deleted file mode 100644 index 2e3242e1..00000000 --- a/src/main/webapp/WEB-INF/manager/include/local.ftl +++ /dev/null @@ -1,39 +0,0 @@ -<#list localMessages as item> - - - \ No newline at end of file