diff options
author | Meway <mewaysid92@gmail.com> | 2025-06-30 13:24:20 -0500 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2025-07-01 19:00:09 +0200 |
commit | 7e5ad3f0bf1caab1802aac59f20bf7c60c70c3b3 (patch) | |
tree | 394d47523cf2cbf4426ef247b4a9be5ff0a6f758 | |
parent | e9a7250ddd286a062b6ff84f0a907f8318bad6d5 (diff) | |
download | verse-7e5ad3f0bf1caab1802aac59f20bf7c60c70c3b3.tar.gz verse-7e5ad3f0bf1caab1802aac59f20bf7c60c70c3b3.tar.bz2 verse-7e5ad3f0bf1caab1802aac59f20bf7c60c70c3b3.tar.xz verse-7e5ad3f0bf1caab1802aac59f20bf7c60c70c3b3.zip |
Just some changes to compile on windows - _nl_locale_name_default to
setlocale
TODO: what?
-rw-r--r-- | src/utils/gettexthelper.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/utils/gettexthelper.cpp b/src/utils/gettexthelper.cpp index fadc19530..d3a5d30c2 100644 --- a/src/utils/gettexthelper.cpp +++ b/src/utils/gettexthelper.cpp @@ -36,13 +36,15 @@ #ifdef _WIN32 #include <string> -extern "C" char const *_nl_locale_name_default(void); +//extern "C" char const *_nl_locale_name_default(void); #endif // _WIN32 + #elif defined(ENABLE_CUSTOMNLS) #include "utils/translation/podict.h" #ifdef __native_client__ #include "utils/naclmessages.h" #endif // __native_client__ + #endif // ENABLE_NLS #if defined(ENABLE_NLS) || defined(ENABLE_CUSTOMNLS) && !defined(_WIN32) @@ -57,7 +59,8 @@ static std::string setLangEnv() std::string lang = config.getStringValue("lang"); #if defined(ENABLE_NLS) && defined(_WIN32) if (lang.empty()) - lang = std::string(_nl_locale_name_default()); + lang = std::string(setlocale(LC_MESSAGES, "")); + #elif defined(ENABLE_CUSTOMNLS) && defined(__native_client__) if (lang.empty()) { |