如题,java中有没有提供获取操作系统语言的API,小弟做的一个东东,提供中文和英文两种语言,
我想再java层对操作系统进行判断,如果我EN OS,则显示EN网页,反之,则显示中文网页。向各位请教!
我想再java层对操作系统进行判断,如果我EN OS,则显示EN网页,反之,则显示中文网页。向各位请教!
解决方案 »
- 紧急求救,JAVA C++ DES加密解密
- e自然对数小数点后50000位???
- Prohibited package name: java.awt 怎么解决
- 请教百钱买百鸡问题
- 窗口间如何传递键盘消息?
- 初学者问题
- ServerSocket编程问题,100分相送!!
- 如何让Jframe或者jdialog没有关闭按钮和最小化。最大化按钮
- 怎样将汉字(一级3755二级3008)与对应的拼音排序!急呀!(高分在线等待……)
- 用java编写的程序如何移植到手机上,就像下载手机铃声一样
- 各位大侠,请教一个问题:
- JLabel添加addMouseListener并实现了mouseClicked和mousePressed为什么还监听不到消息
apahce的commons工具包可能有这个功能, 我不是很确定有没有你想要的功能.
这里面有个类叫SystemUtils, 你自己查查帮助看看.
http://jakarta.apache.org/commons/lang/apidocs/index.htmlUSER_LANGUAGE
public static final String USER_LANGUAGEThe user.language System Property. User's language code, such as "en".Defaults to null if the runtime does not have security access to read this property or the property does not exist.This value is initialized when the class is loaded. If System.setProperty(String,String) or System.setProperties(java.util.Properties) is called after this class is loaded, the value will be out of sync with that System property.
Since:
2.0, Java 1.2
返回zh表示中文
让客户端将class下载到本地执行,
不然的话,class在服务端执行,那么系统属性只能获得服务器的属性,
而不能得到客户端的属性。没有测试过,纯属个人意见。