In illustrating how the Great War came to be viewed increasingly by Germans as an existential struggle, Max Hastings, in his Catastrophe: 1914: Europe Goes to War (p. 542), describes how
The words sein oder nichtsein — 'to be or not to be' - were constantly on people's lips.
Does this phrase, as implied, enter the German through from Hamlet? Were the Germans indeed quoting Shakespeare as they fought the British? Or does the phase have an independent origin — if not in English, at least in German?