主要是根据不同的语言设置,得到不同的值
建几个文件
LocalStrings.properties //helloworld.title = Hello World!
LocalStrings_en.properties //helloworld.title = Hello World!
LocalStrings_es.properties //helloworld.title = Hola Mundo!
在程式内写
ResourceBundle rb = ResourceBundle.getBundle("LocalStrings",request.getLocale());
String title = rb.getString("helloworld.title");
建几个文件
LocalStrings.properties //helloworld.title = Hello World!
LocalStrings_en.properties //helloworld.title = Hello World!
LocalStrings_es.properties //helloworld.title = Hola Mundo!
在程式内写
ResourceBundle rb = ResourceBundle.getBundle("LocalStrings",request.getLocale());
String title = rb.getString("helloworld.title");
解决方案 »
- struts2 jquery ajax提交表单,后台怎么才能得到页面的值?代码怎么写啊?
- java做按字母搜索 对应汉字
- 求职 java软件工程师
- 这段话什么意思~~~ 苦脑啊!!
- 1对多关系查询问题
- 怎么样能 从oracle数据库提出数据到一个下拉框里面?
- 时间转化问题
- 高分求java mail收邮件附件源码
- 为什么frame里面不能写jsp文件?<frame name="left" scrolling="NO" noresize src="left.jsp">
- servlet如果输出一个图像到一个web page?300分
- 在JBuilder9.0中能否设计WEB UI?
- 大家帮我看看这个错误,谢谢!
能不能讲一讲
都没有用过吗