怎么创个网站,单品网站模板,物流网站的建设论文一万字,vue做网站1.resources目录新增国际化资源文件 我项目默认英文#xff0c;增加了一个zh中文的,en-英语 cn-中文 2.参数定义#xff0c;中文需转为Unicode编码#xff0c;推荐Unicode编码转换 - 站长工具 (chinaz.com) 3.新增类CodeChronoBundle继承AbstractBundle
package com.codech…1.resources目录新增国际化资源文件 我项目默认英文增加了一个zh中文的,en-英语 cn-中文 2.参数定义中文需转为Unicode编码推荐Unicode编码转换 - 站长工具 (chinaz.com) 3.新增类CodeChronoBundle继承AbstractBundle
package com.codechrono.idea.plugin.utils;import com.intellij.AbstractBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;import java.util.Locale;public final class CodeChronoBundle extends AbstractBundle {NonNlspublic static final String ONEDAY_BUNDLE CodeChronoBundle;private static final CodeChronoBundle INSTANCE new CodeChronoBundle();private CodeChronoBundle() {super(ONEDAY_BUNDLE);}//项目中可调用该静态方法为组件文本赋值NotNullpublic static String message(NotNull PropertyKey(resourceBundle ONEDAY_BUNDLE) String key, NotNull Object ... params) {return INSTANCE.getMessage(key, params);}
}
项目中使用 //组件文本赋值
weekRadioButton.setText(message(contentJpanel.weekRadioButton.text)); 推荐链接 创建Java插件项目 | IntelliJ Platform Plugin SDK (beansoft.github.io) IntelliJ Platform SDK | IntelliJ Platform Plugin SDK (jetbrains.com)