String codeListValue = (String) value;
if (codeListValue != null && codelist != null && langCode != null) {
String translation = codeListValue;
try {
final GeonetContext gc = (GeonetContext) ServiceContext.get().getHandlerContext(Geonet.CONTEXT_NAME);
Translator t = new CodeListTranslator(gc.getBean(SchemaManager.class),
(String) langCode,
(String) codelist);
translation = t.translate(codeListValue);
} catch (Exception e) {
Log.error(Geonet.GEONETWORK, "Failed to translate codelist " + e.getMessage());
}
return translation;
} else {