Van Herk, What Is Sociolinguistics, chapter 11. (via transliterations)
The Wikipedia article on code-switching has a nice classification of the types and linguistic rules involved:
- Intersentential switching occurs outside the sentence or the clause level (i.e. at sentence or clause boundaries). It is sometimes called "extrasentential" switching. In Assyrian-English switching one could say, “Ani wideili. What happened?” (“Those, I did them. What happened?”)
- Intra-sentential switching occurs within a sentence or a clause. In Spanish-English switching one could say, “La onda is to fight y jambar." ("The in-thing is to fight and steal.”)
- Tag-switching is the switching of either a tag phrase or a word, or both, from one language to another, (common in intra-sentential switches). In Spanish-English switching one could say, “Él es de México y así los criaron a ellos, you know.” (“He’s from Mexico, and they raise them like that, you know.”)
- Intra-word switching occurs within a word itself, such as at a morpheme boundary. In Shona-English switching one could say, “But ma-day-s a-no a-ya ha-ndi-si ku-mu-on-a. (“But thesedays I don’t see him much.”) Here the English plural morpheme -s appears alongside the Shona prefix ma-, which also marks plurality.