As I mentioned yesterday, the difference between code-switching and diglossia is that diglossia is a more intentional changing of dialect due to situation and code-switching is a more subconscious change. Following is an example of how this works with the Yooper dialect -
A family friend who is a 60ish non-native Upper Peninsula woman, says that even though she was not born or raised in the Upper Peninsula, she married a native and now uses the dialect on a daily basis. She attributes this, initially to her repeated exposure to the dialect and wanting to fit in, but claims it is now out of habit. Though when she talks to her family in Lower Michigan she subconsciously switches back to her original dialect. However, with certain friends from Lower Michigan she will not automatically switch and with others she has to make a conscious effort to do so to fit back in with these friends.