1. 首先写个批处理文件cn.bat,保存在任何path路径文件夹中,我是直接存在jdk的bin文件夹里的,文件就两句,内容如下:
@ECHO OFF
native2ascii %1.properties %1_zh_CN.properties
OK,这就行了。
2. 比如我们写了一个message.properties文件:
hello=欢迎你,{0}
now=现在时间是: {0}
3. 直接在cmd中运行 cn message 回车,注意不用加扩展名properties,
哈哈,我们的message_zh_CN.proerties已经生成好了!!
而且原文件message.properties可以留下来,以后要修改的时候直接修改一下,再运行一次 cn message 就行了,太方便了!
快速完成properties文件转码操作,struts 配置文件有用
最新推荐文章于 2022-09-05 15:19:21 发布