diff --git a/platform/platform-impl/src/com/intellij/ide/actions/WhatsNewAction.java b/platform/platform-impl/src/com/intellij/ide/actions/WhatsNewAction.java index 656225ba7c36..f2a6673ebc70 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/WhatsNewAction.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/WhatsNewAction.java @@ -125,9 +125,9 @@ public class WhatsNewAction extends AnAction implements DumbAware { theme += "-new-ui"; } parameters.put("theme", theme); - var locale = Locale.getDefault(); - if (locale != null) { - parameters.put("lang", locale.toLanguageTag().toLowerCase(Locale.ENGLISH)); + var languageTag = getSiteLanguageTag(); + if (languageTag != null) { + parameters.put("lang", languageTag.toLowerCase(Locale.ENGLISH)); } var request = HTMLEditorProvider.Request.url(Urls.newFromEncoded(url).addParameters(parameters).toExternalForm()); @@ -149,4 +149,10 @@ public class WhatsNewAction extends AnAction implements DumbAware { var title = IdeBundle.message("update.whats.new", ApplicationNamesInfo.getInstance().getFullProductName()); HTMLEditorProvider.openEditor(project, title, request); } + + private static @Nullable String getSiteLanguageTag() { + var language = Locale.getDefault().getLanguage(); + var region = Locale.getDefault().getCountry(); + return language.isEmpty() || region.isEmpty() ? null : language + '-' + region; + } }