private static void initLanguageCache() {
    ourLanguageCache = ContainerUtil.createWeakValueMap();

    Collection<Language> registeredLanguages;
    do {
      registeredLanguages = new ArrayList<>(Language.getRegisteredLanguages());
      for (Language language : registeredLanguages) {
        if (LanguageUtil.isInjectableLanguage(language)) {
          String languageID = language.getID();
          ourLanguageCache.put(languageID, language);
          String lowerCase = languageID.toLowerCase(Locale.ROOT);
          if (!lowerCase.equals(languageID)) {
            ourLanguageCache.put(lowerCase, language);
          }
        }
      }
    } while (Language.getRegisteredLanguages().size() != registeredLanguages.size());

    ourLanguageCount = registeredLanguages.size();
  }
private static void initLanguageCache()