diff --git a/docs/changes.txt b/docs/changes.txt index fab00ba096..fdbc5cb67f 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -63,6 +63,12 @@ Changes in behaviour not resulting in compilation errors mode under MSW, use the new AreAppsDark() or IsSystemDark() to check if the other applications or the system are using dark mode. +- wxUILocale::IsSupported() now returns false for unavailable locales under + Unix systems without trying to fall back on another locale using the same + language in a different region, e.g. it doesn't use fr_FR if fr_BE is not + available. If any locale using the given language is acceptable, the region + must be left empty, e.g. just "fr" would use any available "fr_XX". + Changes in behaviour which may result in build errors ----------------------------------------------------- diff --git a/src/unix/uilocale.cpp b/src/unix/uilocale.cpp index b9ef63865f..d5583d902d 100644 --- a/src/unix/uilocale.cpp +++ b/src/unix/uilocale.cpp @@ -272,11 +272,11 @@ locale_t TryCreateLocaleWithUTF8(wxLocaleIdent& locId) locale_t TryCreateMatchingLocale(wxLocaleIdent& locId) { locale_t loc = TryCreateLocaleWithUTF8(locId); - if ( !loc ) + if ( !loc && locId.GetRegion().empty() ) { - // Try to find a variant of this locale available on this system: first - // of all, using just the language, without the territory, typically - // does _not_ work under Linux, so try adding one if we don't have it. + // Try to find a variant of this locale available on this system: as + // using just the language, without the territory, typically does _not_ + // work under Linux, we try adding one if we don't have it. const wxString lang = locId.GetLanguage(); const wxLanguageInfos& infos = wxGetLanguageInfos();