Adding code snippet to demonstrate switching locale

moving gist snippet https://gist.github.com/3dd13/9946929 to document as a reference