use of org.obiba.core.translator.JsonTranslator in project mica2 by obiba.
the class ExtendedResourceBundleMessageSource method resolveCodeWithoutArguments.
@Override
protected String resolveCodeWithoutArguments(String code, Locale locale) {
String result = super.resolveCodeWithoutArguments(code, locale);
if (result != null)
return result;
final String key = locale.getLanguage();
JsonTranslator translator = getTranslator(key);
if (translator != null) {
try {
result = translator.translate(code);
} catch (Exception e) {
// ignore
}
}
return result;
}
Aggregations