Browse Source

REPORT-29457 国际化读取问题

feature/big-screen
hades 5 years ago
parent
commit
8ca6f60ea7
  1. 7
      designer-base/src/main/java/com/fr/design/i18n/DesignI18nImpl.java

7
designer-base/src/main/java/com/fr/design/i18n/DesignI18nImpl.java

@ -15,6 +15,11 @@ import java.util.Locale;
public class DesignI18nImpl implements DesignI18nProvider {
static {
// GeneralContext上下文 存储本次启动的语言环境 直接使用DesignerEnvManager 会在设置语言环境后 不重启 立即生效 存在问题
GeneralContext.setLocale(DesignerEnvManager.getEnvManager().getLanguage());
}
private static DesignI18nImpl instance = new DesignI18nImpl();
public static DesignI18nImpl getInstance() {
@ -30,7 +35,7 @@ public class DesignI18nImpl implements DesignI18nProvider {
@Override
public String i18nText(String key) {
return localeManager.getLocalBundle(DesignerEnvManager.getEnvManager().getLanguage()).getText(localeManager, key);
return localeManager.getLocalBundle(GeneralContext.getLocale()).getText(localeManager, key);
}
@Override

Loading…
Cancel
Save