Am 27.06.2017 um 10:05 schrieb Lukasz Lenart: > 2017-06-27 8:59 GMT+02:00 i...@flyingfischer.ch <i...@flyingfischer.ch>: >> For the time being, it really can't be shorter than this?: >> >> final LocaleProviderFactory factory = >> ActionContext.getContext().getInstance(LocaleProviderFactory.class); >> final Locale locale = factory.createLocaleProvider().getLocale(); >> final ResourceBundle bundle = >> ResourceBundle.getBundle("global-messages", locale); >> final LocalizedTextProvider provider = >> ActionContext.getContext().getInstance(LocalizedTextProvider.class); >> final String value = provider.findText(bundle, key, locale); > Why do you need a bundle? If you defined the "global-messages" in the > "struts.custom.i18n.resources" you do need to refer to a bundle > anymore. >
Thanks again! provider.findText() seems to need in any case three arguments. provider.findDefaultText(key, locale) works perfectly without bundle. Markus --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org For additional commands, e-mail: dev-h...@struts.apache.org