|
|
|
@ -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 |
|
|
|
|