anchor.diff:  (in-package :djula)
   
   (defvar *translation-backend* nil "The translation backend. One of :locale, :gettext")
  +
  +(defvar *warn-on-untranslated-messages* t)
  +(defvar *untranslated-messages* nil)
   
   (defun translate (string &optional args
                              (language (or *current-language* *default-language*))
  
positive.code: (defun format-translation (string &rest args)
    (apply #'format nil
           (ppcre:regex-replace-all
                 "\\:(\\w*)"
                 string
                 (lambda (_ varname)
                   (declare (ignore _))
                   (let ((val (access:access args (make-keyword varname))))
                     (or (and val (princ-to-string val))
                         (error "~A missing in ~A translation" varname string))))
                 :simple-calls t)
            args))
                                         
  (defgeneric backend-translate (backend string language &rest args)
    (:method ((backend null) string language &rest args)
      (error "Translation backend has not been setup"))
  
negative.code: 
  #-lispworks
  (defmethod backend-translate ((backend (eql :locale)) string language &rest args)
    (let ((dictionary (locale:current-dictionary)))
      (when (not (arnesi:aand (not (eq language locale:*default-locale*))
                              (gethash language dictionary)
                              (gethash string arnesi:it)))
        (when *warn-on-untranslated-messages*
          (warn "DJULA TRANSLATION NOT GIVEN: ~A ~A" string language))
        (pushnew (cons string language) *untranslated-messages* :test 'equalp)))
    (apply #'format-translation
           (cl-locale:i18n string
                           :locale language
  