code: private List<String> loadProfiles(List<Locale> locales) throws Exception {
  
          List<String> profiles = new ArrayList<String>();
          List<String> languagesAdded = new ArrayList<String>();
          for (Locale locale : locales) {
              try {
                  String lang = locale.getLanguage();
                  // make sure not to add a profile twice
                  if (!languagesAdded.contains(lang)) {
                      languagesAdded.add(lang);
                      String profileFile = "profiles" + "/" + lang;
                      InputStream is = getClass().getClassLoader().getResourceAsStream(profileFile);
                      if (is != null) {
                          String profile = IOUtils.toString(is, "UTF-8");
                          if ((profile != null) && (profile.length() > 0)) {
                              profiles.add(profile);
                          }
                          is.close();
                      } else {
                          LOG.warn(
                              Messages.get().getBundle().key(
                                  Messages.INIT_I18N_LAND_DETECT_PROFILE_NOT_AVAILABLE_1,
                                  locale));
                      }
                  }
              } catch (Exception e) {
                  LOG.error(
                      Messages.get().getBundle().key(Messages.INIT_I18N_LAND_DETECT_LOADING_PROFILE_FAILED_1, locale),
                      e);
              }
          }
          return profiles;
      }
docs: Load the profiles from the classpath.<p>
  
  @param locales the locales to initialize.<p>
  
  @return a list of profiles
  
  @throws Exception if something goes wrong