'Return a langinfo for the given Komodo language name.
There are some minor differences in Komodo language names and
those in langinfo (e.g. "Django" in Komodo vs "Django HTML
Template" in langinfo).'

def langinfo_from_komodo_lang(self, komodo_lang, tryFallback=True):

    if (self._li_from_norm_komodo_lang is None):
        self._build_tables()
    norm_komodo_lang = self._norm_lang_from_lang(komodo_lang)
    if (norm_komodo_lang in self._li_from_norm_komodo_lang):
        return self._li_from_norm_komodo_lang[norm_komodo_lang]
    elif (norm_komodo_lang in self._langinfo_from_norm_lang):
        return self._langinfo_from_norm_lang[norm_komodo_lang]
    elif tryFallback:
        try:
            from xpcom import components
        except ImportError:
            pass
        else:
            langSvc = components.classes['@activestate.com/koLanguageRegistryService;1'].getService(components.interfaces.koILanguageRegistryService)
            koLang = langSvc.getLanguage(komodo_lang)
            if ((koLang is not None) and (koLang.name in (komodo_lang, norm_komodo_lang))):
                log.warn('no    LangInfo    class    found    for    %r,    creating    a    fallback    for    it', komodo_lang)
                self._langinfo_from_norm_lang[norm_komodo_lang] = _generateFallbackKoLangInfo(self, koLang)
                self._build_tables()
                return self.langinfo_from_komodo_lang(komodo_lang, tryFallback=False)
    raise LangInfoError(('no    info    on    %r    komodo    lang' % komodo_lang))
