本文整理汇总了Java中org.eclipse.e4.core.services.translation.TranslationService类的典型用法代码示例。如果您正苦于以下问题:Java TranslationService类的具体用法?Java TranslationService怎么用?Java TranslationService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TranslationService类属于org.eclipse.e4.core.services.translation包,在下文中一共展示了TranslationService类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initialize
import org.eclipse.e4.core.services.translation.TranslationService; //导入依赖的package包/类
public static void initialize(IEclipseContext applicationContext){
apContext = applicationContext;
//bug fix...
apContext.set(TranslationService.LOCALE, "en");
csContext.setParent(apContext);
}
示例2: setResourceBundle
import org.eclipse.e4.core.services.translation.TranslationService; //导入依赖的package包/类
@Inject
void setResourceBundle(ResourceBundleProvider provider, @Named(TranslationService.LOCALE) Locale locale) {
Bundle bundle = FrameworkUtil.getBundle(this.getClass());
this.resourceBundle = provider.getResourceBundle(bundle, locale.toString());
}
示例3: getNotifiedByInjection
import org.eclipse.e4.core.services.translation.TranslationService; //导入依赖的package包/类
@Inject
@Optional
private void getNotifiedByInjection(@Named(TranslationService.LOCALE) Locale s) {
System.out.println("Injected via context: " + s);
}
示例4: execute
import org.eclipse.e4.core.services.translation.TranslationService; //导入依赖的package包/类
@Execute
public void execute(ILocaleChangeService lcs, @Named(TranslationService.LOCALE) Locale locale) {
Locale input = (locale != null && locale.equals(Locale.GERMAN)) ? Locale.ENGLISH : Locale.GERMAN;
lcs.changeApplicationLocale(input);
}