配置文件
FAULT_100 = 急停按下,否则急停坏了!,Emergency stop press,or emergency stop is broken!
FAULT_106 = 阶段L1欠压!,Phase L1 Undervoltage!
FAULT_101 = 阶段L3过电压,Phase L3 Overvoltage
FAULT_105 = 阶段L1过电压,Phase L1 Overvoltage
FAULT_103 = 阶段L2过电压,Phase L2 Overvoltage
FAULT_104 = 阶段L2欠压,Phase L2 Undervoltage
FAULT_102 = 阶段L3欠压,Phase L3 Undervoltage
FAULT_110 = RCD漏电保护,RCD leakage protection
FAULT_116 = PEN故障,PEN Fault
FAULT_115 = PE故障,PE Fault
FAULT_111 = 485故障,485 Fault
FAULT_113 = A类交换机故障,Type A Switch Fault
FAULT_114 = 继电器故障,Relay Fault
FAULT_108 = 过流故障,Overcurrent Fault
FAULT_112 = 防雷故障,Lightning Protection Fault
FAULT_1000 = 紧急停止按,Emergency stop press
通过获取配置文件来实现国际化
private static Properties properties;
static {
try {
properties = new Properties();
InputStreamReader is=new InputStreamReader(TUtils.class.getResourceAsStream("/config/charge_languge.properties"),"UTF-8");
properties.load(is);
is.close();
} catch (IOException e) {
e.printStackTrace();
}
}
public static String getProp(String key){
return properties.getProperty(key);
}
InputStreamReader :防止乱码
根据配置文件中 用字符串切割 “,” 来实现国际化