In this article, we provide a framework of bilingual grammar that offers a theoretical understanding of the socio-cognitive bases of code-switching in terms of five general principles that, individually or through interaction with each other, explain how and why specific instances of code-switching arise. We provide cross-linguistic empirical evidence to claim that these general sociolinguistic principles, stated as socio-cognitive constraints on code-switching, characterize multi-linguistic competence in so far as they are able to show how “local” functions of code-switching arise as specific instantiations of these “global” principles, or (products of) their interactions.