Text Messages from Java

You can access text labels in Java code from standard Wicket localizers for a Web page, then access the text string using a key and a class name. The class name allows you to search the class resource hierarchy, which is the same as searching static Wicket text labels in HTML templates.

For example:
} catch (Exception e) {      
   LOG.error("# An error occurred while updating the consumer from friends list", e);  
   error(getLocalizer().getString("update.friend.error", this));