public static void initProfiles() {
        clearProfiles();

        StringBuilder stringBuilder = new StringBuilder();
        InputStream stream;
        stream = LanguageIdentifier.class.getResourceAsStream(PROPERTIES_OVERRIDE_FILE);
        if (stream == null) {
            stream = LanguageIdentifier.class.getResourceAsStream(PROPERTIES_FILE);
        }

        if (stream != null) {
            try {
                props = new Properties();
                props.load(stream);
            } catch (IOException e) {
                stringBuilder.append("IOException while trying to load property file. Message: ")
                        .append(e.getMessage())
                        .append("\n");
            }
        }

        String[] languages = props.getProperty(LANGUAGES_KEY).split(",");
        for (String language : languages) {
            language = language.trim();
            String name = props.getProperty("name." + language, "Unknown");
            try {
                addProfile(language);
            } catch (Exception e) {
                stringBuilder.append("Language ").append(language).append(" (").append(name)
                        .append(") not initialized. Message: ")
                        .append(e.getMessage()).append("\n");
            }
        }
        errors = stringBuilder.toString();
    }
Builds the language profiles.
The list of languages are fetched from a property file named "tika.language.properties"
If a file called "tika.language.override.properties" is found on classpath, this is
used instead The property file contains a key "languages" with values being
comma-separated language codes
tika-langdetect/tika-langdetect-tika/src/main/java/org/apache/tika/langdetect/tika/LanguageIdentifier.java