“code switching: Switching in speech between different languages, dialects, etc. E.g. two business associates meet and chat in one language; the meeting becomes formal and they switch to another. Often analyzed into subtypes, e.g. as occurring within sentences or at sentence boundaries. Sometimes distinguished from code mixing, or from borrowing; sometimes not.
The term ‘code’ is loosely used of any language or distinct variety of a language, whether or not it is actually thought of as a code (like the Morse code or a legal code) in any illuminating sense.”
Excerpted from: Marshall, P.H., ed. The Oxford Concise Dictionary of Linguistics. New York: Oxford University Press, 2014.