Tries to guess the name of a language given its id.

From `prism-show-language.js`.

@param {string} id The language id.
@returns {string}
553859
function guessTitle(id) {
			if (!id) {
				return id;
			}
			return (id.substring(0, 1).toUpperCase() + id.substring(1)).replace(/s(?=cript)/, 'S');
		}
509892
def get_language(self, language_id):
        

        raw_response = requests_util.run_request('get', self.API_BASE_URL + '/languages/%d' % language_id,
                                                 headers=self.__get_header_with_auth())

        return self.parse_raw_response(raw_response)
1267453
function _getProvidersForLanguageId(languageId) {
        var providers = hintProviders[languageId] || hintProviders.all;

        // Exclude providers that are explicitly disabled in the preferences.
        // All code hint providers that do not have their constructor
        // names listed in the preferences are enabled by default.
        return providers.filter(function (provider) {
            var prefKey = "codehint." + provider.provider.constructor.name;
            return PreferencesManager.get(prefKey) !== false;
        });
    }
624587
public String toIdString(Object id) {
        if (id == null) {
            return null;
        }
        return idStringMapper.toString(id);
    }
1370734
function checkId(id) {
  id = id || "";
  id = id.toString();
  return _.isString(id) && id.length === 24;
}
1180405
function(id) {
            var el = YAHOO.util.Dom.get(id);
            return (el) ? el.style : null;
        }
936655
function resolveLanguage ( value ) {
	if ( typeof value === 'string' ) {
		const lang = _.find(langs, ( o ) => { return o.locale.indexOf(value) !== -1; });
		if ( typeof lang !== 'undefined' ) {
			return lang.id;
		}
	}
	return value;
}
1092030
def get_language(self, name):
        

        for language in self.__languages:
            if language.name == name:
                LOGGER.debug("> Language '{0}': '{1}'.".format(name, language))
                return language
996023
function(id) {
    if (id && (id = id.trim())) {

      // js embend 同名.html 而 同名.html 又开启了依赖同名.js，然后就出现了，自己依赖自己了。
      // 所以这里做了 id !== this.id 的判断
      if (id !== this.id && !~this.requires.indexOf(id)) {
        this.requires.push(id);
      }

      // 如果在异步依赖中，则需要把它删了。
      var idx;
      if (~(idx = this.asyncs.indexOf(id))) {
        this.asyncs.splice(idx, 1);
      }

      return id;
    }
    return false;
  }
806571
@Nullable
  public static Language getLanguageForName(String languageName) {
    for (Language element : getStaticAndDynamicLanguages()) {
      if (languageName.equals(element.getName())) {
        return element;
      }
    }
    return null;
  }
464267
function isKeyword(id) {
        switch (id.length) {
        case 2:
            return (id === 'if') || (id === 'in') || (id === 'do');
        case 3:
            return (id === 'var') || (id === 'for') || (id === 'new') ||
                (id === 'try') || (id === 'let');
        case 4:
            return (id === 'this') || (id === 'else') || (id === 'case') ||
                (id === 'void') || (id === 'with') || (id === 'enum');
        case 5:
            return (id === 'while') || (id === 'break') || (id === 'catch') ||
                (id === 'throw') || (id === 'const') || (id === 'yield') ||
                (id === 'class') || (id === 'super');
        case 6:
            return (id === 'return') || (id === 'typeof') || (id === 'delete') ||
                (id === 'switch') || (id === 'export') || (id === 'import');
        case 7:
            return (id === 'default') || (id === 'finally') || (id === 'extends');
        case 8:
            return (id === 'function') || (id === 'continue') || (id === 'debugger');
        case 10:
            return (id === 'instanceof');
        default:
            return false;
        }
    }
662893
public static function getLanguageTranslateByIdAndLanguageId($id, $languageId)
    {
        $languageTranslate = self::findOne(['id' => $id, 'language' => $languageId]);
        if (!$languageTranslate) {
            $languageTranslate = new self([
                'id' => $id,
                'language' => $languageId,
            ]);
        }

        return $languageTranslate;
    }
546668
public function getLangcodeFromStoreId($store_id) {
    $mapping = $this->getStoreLanguageMapping();
    $mapping = is_array($mapping) && !empty($mapping) ? array_flip(array_filter($mapping)) : NULL;

    if (empty($store_id)) {
      return array_shift($mapping);
    }

    return !empty($mapping[$store_id]) ? $mapping[$store_id] : NULL;
  }
962754
function loadPrismLang(lang) {
    if (!lang) return undefined;
    let langObject = Prism.languages[lang];
    if (langObject === undefined) {
        try {
            require('prismjs/components/prism-' + lang);
            return Prism.languages[lang];
        } catch (e) {
            // nothing to do
        }
    }
    return langObject;
}
140771
public static String getLocalizedId(String id, Locale locale) {
        String locstr = locale == null ? "" : ("_" + locale.toString());
        return id + locstr;
    }
1082356
function getId(element) {
        var state = getState(element);

        if (state && state.id !== undefined) {
            return state.id;
        }

        return null;
    }
453379
private I18N getI18N(String sessionId) {
        return multiSession ? I18NProvider.getInstance(sessionId) : I18NProvider.getInstance();
    }