Google needs to be able to crawl every language version at a distinct URL. Anything that serves different content at the same URL based on the visitor makes that impossible.
Locale-adaptive pages
Serving different content at one URL depending on the visitor location or Accept-Language header. Google supports it but recommends against it: Googlebot crawls predominantly from US IPs and with a generic language header, so it will usually only ever see one version.
Better approach
Separate URLs per language, hreflang between them, and a dismissible banner offering the visitor their likely preference.
Alien Road recommends: never let language selection depend on a cookie alone. Googlebot does not carry cookies between requests, so a cookie-driven site looks like a single-language site to Search regardless of how many translations you have paid for.