The codes of World War I EurekAlert!, 12 May 2016 When the United States declared war on Germany in April 1917, the Americans were woefully unprepared to wage a modern war.