Created new method that converts a code to a Locale object.