BERLIN  An Algerian man and a Nigerian man were detained in central Germany on Thursday on suspicion of preparing an attack with a machete and guns, which were confiscated, as about 450 police officers swooped down on 12 locations.