First, language identification could precede lexical processing: a bilingual could initially determine which language is being spoken (perhaps on the basis of phonetic features,Then, they could switch into that language, and find the relevant word. On this account, code-switching costs would arise from the need to switch languages prior to accessing the code-switched word
Second, lexical access could occur prior to (or independent of) recognizing the language of the word being processed: a bilingual could simultaneously map the sounds they hear (or the letters/signs they see) onto lexical forms in both of the languages that they knowOn this second account, language identification might only be achieved after the word is accessed and recognized as belonging to a particular lexicon