added ability to programmatically change locale