Created method for get the Locale objects from a properties file.