summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-11-24 12:16:42 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-11-24 12:16:47 +0300
commitbbbc9a25e43656c9a8d6a7a310e4fd69617c9d41 (patch)
treea9352a4d53109b880b79bd60dcba12ac5350bd8d /src
parent3b04426eafa69722f2ef95eca031b15c3b462346 (diff)
fixes #3958 (Telegram: сообщение о новом входе приходят на английском)
Diffstat (limited to 'src')
-rw-r--r--src/mir_core/src/Windows/langpack.cpp11
-rw-r--r--src/mir_core/src/mir_core.def1
-rw-r--r--src/mir_core/src/mir_core64.def1
3 files changed, 13 insertions, 0 deletions
diff --git a/src/mir_core/src/Windows/langpack.cpp b/src/mir_core/src/Windows/langpack.cpp
index 963174d161..40b72d3a43 100644
--- a/src/mir_core/src/Windows/langpack.cpp
+++ b/src/mir_core/src/Windows/langpack.cpp
@@ -516,6 +516,17 @@ MIR_CORE_DLL(int) Langpack_GetDefaultLocale()
return (langPack.Locale == 0) ? LOCALE_USER_DEFAULT : langPack.Locale;
}
+MIR_CORE_DLL(char*) Langpack_GetDefaultLocaleName()
+{
+ static char buf[10];
+ if (langPack.Locale == 0)
+ strcpy(buf, "en");
+ else
+ GetLocaleInfoA(langPack.Locale, LOCALE_SPARENT, buf, _countof(buf));
+
+ return buf;
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
MIR_CORE_DLL(char*) TranslateA_LP(const char *str, HPLUGIN pPlugin)
diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def
index c26da39e57..1b934ef47f 100644
--- a/src/mir_core/src/mir_core.def
+++ b/src/mir_core/src/mir_core.def
@@ -1559,3 +1559,4 @@ db_event_updateId @1772
?isExecutable@MFilePath@@QBE_NXZ @1783 NONAME
?GetPlugin@CDlgBase@@QBEPBVCMPluginBase@@XZ @1784 NONAME
_TranslateW_UUID@8 @1785 NONAME
+?Langpack_GetDefaultLocaleName@@YGPADXZ @1786 NONAME
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def
index 267d2af5c9..8007570bba 100644
--- a/src/mir_core/src/mir_core64.def
+++ b/src/mir_core/src/mir_core64.def
@@ -1559,3 +1559,4 @@ db_event_updateId @1772
?isExecutable@MFilePath@@QEBA_NXZ @1783 NONAME
?GetPlugin@CDlgBase@@QEBAPEBVCMPluginBase@@XZ @1784 NONAME
TranslateW_UUID @1785 NONAME
+?Langpack_GetDefaultLocaleName@@YAPEADXZ @1786 NONAME