增加多语言配置文件

This commit is contained in:
许轲 2023-08-24 02:08:44 +08:00
parent 80872b6511
commit 014186b050

View File

@ -23,7 +23,8 @@ public class Config {
public Properties readPropertiesFromFile() {
Properties properties = new Properties();
LANGUAGE_PACK_NAME = EN_LANGUAGE_PACK_NAME;
//设置语言包
LANGUAGE_PACK_NAME = CH_LANGUAGE_PACK_NAME;
try (InputStream inputStream = new FileInputStream(LANGUAGE_PACK_NAME)) {
InputStreamReader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8); // 使用 UTF-8 编码
properties.load(reader);