String targetLanguage = erv.targetLanguage() != null ? erv.targetLanguage() : ERXLocalizer.defaultLanguage();
String targetLanguage = erv.targetLanguage() != null ? erv.targetLanguage() : ERXLocalizer.currentLocalizer().language();
    public String templateForException(ERXValidationException erv) {        String template = null;        if (erv.delegate() != null && erv.delegate() instanceof ExceptionDelegateInterface) {            template = ((ExceptionDelegateInterface)erv.delegate()).templateForException(erv);        }        if (template == null) {            String entityName = erv.eoObject().entityName();            String property = erv.isCustomMethodException() ? erv.method() : erv.propertyKey();            String type = erv.type();            String targetLanguage = erv.targetLanguage() != null ? erv.targetLanguage() : ERXLocalizer.defaultLanguage();            cat.debug("templateForException with entityName: " + entityName + "; property: " + property + "; type: " + type + "; targetLanguage: " + targetLanguage);            ERXMultiKey k = new ERXMultiKey(new NSArray(new Object[] {_kvcNullValue(entityName), _kvcNullValue(property), _kvcNullValue(type), _kvcNullValue(targetLanguage)}));            template = (String)_cache.get(k);            // Not in the cache.  Simple resolving.            if (template == null) {                template = templateForEntityPropertyType(entityName, property, type, targetLanguage);                _cache.put(k, template);            }        }        return template;    }