public static @Nullable String getLanguageForComponent(@NotNull Component component) {
    final Locale locale = getLocaleForComponent(component);
    return locale == null ? null : locale.getLanguage();
  }
public static @Nullable String getLanguageForComponent(@NotNull Component component)