I HATE GLOBAL CONFIGS I HATE GLOBAL CONFIGS I HATE

@tildearrow instead of this nonsense you could have just made a language menu in the interface settings
This commit is contained in:
tildearrow 2024-06-01 16:36:00 -05:00
parent 8e115220a3
commit c9482ba86c
7 changed files with 133 additions and 39 deletions

View file

@ -506,14 +506,18 @@ int main(int argc, char** argv) {
zsmOutName="";
cmdOutName="";
// load config for locale
e.prePreInit();
#ifdef HAVE_LOCALE
String reqLocale=e.getConfString("locale","");
const char* localeRet=NULL;
if ((localeRet=TA_SETLOCALE(LC_CTYPE,"pt_BR"))==NULL) {
if ((localeRet=TA_SETLOCALE(LC_CTYPE,reqLocale.c_str()))==NULL) {
logE("could not set locale (CTYPE)!");
} else {
logV("locale: %s",localeRet);
}
if ((localeRet=TA_SETLOCALE(LC_MESSAGES,"pt_BR"))==NULL) {
if ((localeRet=TA_SETLOCALE(LC_MESSAGES,reqLocale.c_str()))==NULL) {
logE("could not set locale (MESSAGES)!");
} else {
logV("locale: %s",localeRet);