Added function to get language portion from locale