当前位置:网站首页>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>
<%} %>
下面为效果图:
边栏推荐
- Jar runs with error no main manifest attribute
- C杂讲 文件 初讲
- MySQL实战优化高手08 生产经验:在数据库的压测过程中,如何360度无死角观察机器性能?
- jar运行报错no main manifest attribute
- How to build an interface automation testing framework?
- Several silly built-in functions about relative path / absolute path operation in CAPL script
- Vscode common instructions
- 简单解决phpjm加密问题 免费phpjm解密工具
- Installation of pagoda and deployment of flask project
- MySQL combat optimization expert 02 in order to execute SQL statements, do you know what kind of architectural design MySQL uses?
猜你喜欢
C杂讲 动态链表操作 再讲
15 medical registration system_ [appointment registration]
Can I learn PLC at the age of 33
Automation sequences of canoe simulation functions
MySQL storage engine
在CANoe中通過Panel面板控制Test Module 運行(初級)
The programming ranking list came out in February. Is the result as you expected?
17 medical registration system_ [wechat Payment]
MySQL combat optimization expert 02 in order to execute SQL statements, do you know what kind of architectural design MySQL uses?
CANoe下载地址以及CAN Demo 16的下载与激活,并附录所有CANoe软件版本
随机推荐
MySQL ERROR 1040: Too many connections
Implement context manager through with
软件测试工程师发展规划路线
竞赛vscode配置指南
Inject common SQL statement collation
Carolyn Rosé博士的社交互通演讲记录
Listen to my advice and learn according to this embedded curriculum content and curriculum system
Release of the sample chapter of "uncover the secrets of asp.net core 6 framework" [200 pages /5 chapters]
17 医疗挂号系统_【微信支付】
[after reading the series] how to realize app automation without programming (automatically start Kwai APP)
Hugo blog graphical writing tool -- QT practice
MySQL combat optimization expert 04 uses the execution process of update statements in the InnoDB storage engine to talk about what binlog is?
MySQL实战优化高手09 生产经验:如何为生产环境中的数据库部署监控系统?
[after reading the series of must know] one of how to realize app automation without programming (preparation)
C miscellaneous dynamic linked list operation
Teach you how to write the first MCU program hand in hand
Automation sequences of canoe simulation functions
Combined search /dfs solution - leetcode daily question - number of 1020 enclaves
If a university wants to choose to study automation, what books can it read in advance?
在CANoe中通过Panel面板控制Test Module 运行(初级)