diff --git a/src/edframe.cpp b/src/edframe.cpp index 7ba3206cd8..8166ed9c22 100644 --- a/src/edframe.cpp +++ b/src/edframe.cpp @@ -56,6 +56,8 @@ #include #include +#include + #include "catalog.h" #include "catalog_po.h" #include "cat_update.h" @@ -2679,6 +2681,24 @@ void PoeditFrame::UpdateTitle() if (subtitle == "PROJECT VERSION") subtitle.clear(); +#if wxCHECK_VERSION(3,1,5) + if (m_catalog->GetLanguage().IsValid()) + { + // add language to the subtitle, but only if not part of the filename already + auto lang = m_catalog->GetLanguage().LanguageTag(); + if (!boost::algorithm::icontains(fpath.utf8_string(), lang)) + { + boost::replace_all(lang, "-", "_"); + if (!boost::algorithm::icontains(fpath.utf8_string(), lang)) + { + if (!subtitle.empty()) + subtitle += L" • "; + subtitle += m_catalog->GetLanguage().DisplayName(); + } + } + } +#endif + #ifdef __WXOSX__ if (@available(macOS 11.0, *)) {