let install strict destdir language category textdomain filename_mo_src =
  let filename_mo_dst = 
    GettextDomain.make_filename destdir language category textdomain
  in
  let dirname_mo_dst =
    dirname filename_mo_dst
  in
  (* Test of the mo file, it will raise an exception if there is any problem 
     in the MO structure *)

  let ((),_) =
    GettextMo.fold_mo 
      (if strict then
         RaiseException
       else 
         InformStderr
           (function
              | (MoInvalidPlurals _) as e ->
                  Gettext.string_of_exception e
              | e ->
                  raise e))
      (fun x () -> ())
      ()
      filename_mo_src
  in
  mkdir ~parent:true dirname_mo_dst;
  cp [filename_mo_src] filename_mo_dst