fix locale loading

when changed through Settings
This commit is contained in:
tildearrow 2024-06-17 02:16:37 -05:00
parent 34c71b28b2
commit e3fe3ba33e

View file

@ -529,6 +529,11 @@ int main(int argc, char** argv) {
#ifdef HAVE_LOCALE
String reqLocale=e.getConfString("locale","");
if (!reqLocale.empty()) {
if (reqLocale.find(".")==String::npos) {
reqLocale+=".UTF-8";
}
}
const char* localeRet=NULL;
#ifdef HAVE_SETLOCALE
if ((localeRet=setlocale(LC_CTYPE,reqLocale.c_str()))==NULL) {