当前位置:网站首页>UEditor国际化配置,支持中英文切换
UEditor国际化配置,支持中英文切换
2022-07-06 09:11:00 【CHQIUU】
UEditor目前支持中文和英文两种方式。需要用哪个语言直接加载响应的js即可
如下图所示
加载 lang/en/en.js 后显示英文
加载 lang/zh-cn/zh-cn.js 后显示中文
下面提供JSP和FreeMarker两种方式实现页面国际化自动切换。
FreeMarker 页面配置方式
<#if language=='EN'>
<script type="text/javascript" charset="utf-8" src="${contextPath}/static/ueditor/lang/en/en.js"></script>
<#else>
<script type="text/javascript" charset="utf-8" src="${contextPath}/static/ueditor/lang/zh-cn/zh-cn.js"></script>
</#if>
JSP页面配置方式
<%if ("EN".equals(language)){
%>
<script type="text/javascript" charset="utf-8" src="<%=contextPath%>/static/ueditor/lang/en/en.js"></script>
<%} else {
%>
<script type="text/javascript" charset="utf-8" src="<%=contextPath%>/static/ueditor/lang/zh-cn/zh-cn.js"></script>
<%} %>
下面为效果图:
边栏推荐
- Use xtrabackup for MySQL database physical backup
- [CV] target detection: derivation of common terms and map evaluation indicators
- What is the current situation of the game industry in the Internet world?
- MySQL combat optimization expert 03 uses a data update process to preliminarily understand the architecture design of InnoDB storage engine
- MySQL實戰優化高手04 借著更新語句在InnoDB存儲引擎中的執行流程,聊聊binlog是什麼?
- Canoe cannot automatically identify serial port number? Then encapsulate a DLL so that it must work
- MySQL实战优化高手04 借着更新语句在InnoDB存储引擎中的执行流程,聊聊binlog是什么?
- [after reading the series] how to realize app automation without programming (automatically start Kwai APP)
- How can I take a shortcut to learn C language in college
- MySQL combat optimization expert 05 production experience: how to plan the database machine configuration in the real production environment?
猜你喜欢
History of object recognition
Release of the sample chapter of "uncover the secrets of asp.net core 6 framework" [200 pages /5 chapters]
Learning SCM is of great help to society
C miscellaneous shallow copy and deep copy
cmooc互联网+教育
寶塔的安裝和flask項目部署
Contest3145 - the 37th game of 2021 freshman individual training match_ C: Tour guide
Write your own CPU Chapter 10 - learning notes
解决在window中远程连接Linux下的MySQL
Some thoughts on the study of 51 single chip microcomputer
随机推荐
Good blog good material record link
Docker MySQL solves time zone problems
美新泽西州州长签署七项提高枪支安全的法案
C miscellaneous two-way circular linked list
软件测试工程师必备之软技能:结构化思维
Upload vulnerability
AI的路线和资源
The 32-year-old fitness coach turned to a programmer and got an offer of 760000 a year. The experience of this older coder caused heated discussion
Configure system environment variables through bat script
The programming ranking list came out in February. Is the result as you expected?
The appearance is popular. Two JSON visualization tools are recommended for use with swagger. It's really fragrant
A new understanding of RMAN retention policy recovery window
Software test engineer development planning route
Const decorated member function problem
美疾控中心:美国李斯特菌疫情暴发与冰激凌产品有关
MySQL combat optimization expert 06 production experience: how does the production environment database of Internet companies conduct performance testing?
MySQL实战优化高手09 生产经验:如何为生产环境中的数据库部署监控系统?
Not registered via @EnableConfigurationProperties, marked(@ConfigurationProperties的使用)
Combined search /dfs solution - leetcode daily question - number of 1020 enclaves
在CANoe中通过Panel面板控制Test Module 运行(高级)