public static boolean equals(String languageTagA, String languageTagB) {
        Locale localeA = Locale.forLanguageTag(languageTagA);
        Locale localeB = Locale.forLanguageTag(languageTagB);

        // TODO Fill in script if missing and something we could derive from lang+region
        // e.g. zh-CN => zh-Hans-CN, zh-TW => zh-Hant-TW.

        // TODO Treat missing script == present script, if present script is default
        //  (suppressed) for the language. So "en-Latn" == "en"

        // TODO probably OK to ignore extensions

        // TODO Do we want/need a fuzzy match for region (and script)
        // E.g. are 'en' and 'en-GB' equal? Depends on the direction, e.g. if you want 'en', and
        // you get back something more specific (en-GB) then that's OK, but if you explicitly want
        // en-GB and you get back en then that might not be OK.
        return localeA.equals(localeB);
    }
If language is a specific variant of a macro language (e.g. 'nb' for Norwegian Bokmal),
return the macro language (e.g. 'no' for Norwegian). If it doesn't have a macro language,
return unchanged.

@param languageTag
@return
tika-core/src/main/java/org/apache/tika/language/detect/LanguageNames.java