Browse Source

Merge pull request #1572 in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit '8ca6f60ea72b5b9e9ae6f91c05e367c8db80a1ee':
  REPORT-29457 国际化读取问题
feature/big-screen
Hades 5 years ago
parent
commit
5e0a2e0396
  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