(1) This morning I hantar my baby tu dekat babysitter tu lah.
(Malay / English bilingual)
(Source: Romaine, 2000: 55)
(2) Sometimes I’ll start a sentence in English y termino en español.
(English / Spanish bilingual)
(Source: McArthur, T. (ed.). 2005. The Concise Oxford Companion to the English Language. Oxford et al.: Oxford University Press).
In sociolinguistics a language may be referred to as a code. A code is a neutral term which can be used to denote a language or a variety of language.
Code-switching is a linguistic phenomenon which occurs in multilingual speech communities. The term describes the process in which a communicatively competent multilingual speaker alternates or switches usually between two languages or language varieties or codes during the same conversation.
In example (1), the speaker switches between two codes (Malay and English) within a single sentence. This particular type of code-switching is also called intra-sentential code-switching or code-mixing. Intra-sentential code-switching defines a change from one code to another code across clauses (= inter-sentential code switching). In example (2) the first clause is in English and the second in Spanish. The linguistic result is a characteristic hybridization because of the mixing of linguistic elements from two languages within the same sentence or clause.
Code-switching is often used as a superordinate term which also includes code-mixing. While code-switching indicates the movement from one code to another in a single interaction, code-mixing specifically designates a mixture between two codes. This causes a state of hybridization which can make it difficult to identify which language is actually being spoken.
Code-switching as described here is restricted to communicatively competent or skilled bilinguals/multilinguals. It therefore needs to be distinguished from a mixture of languages as performed by unskilled speakers who lack knowledge in a particular code. For instance, language learners who are not yet fully competent tend to fill a lexical gap in their knowledge of the target language (L2) with lexical elements from their native language (L1) whilst speaking. These switches are motivated by a lack of knowledge in vocabulary and are not defined as code-switching.