Locale: remove usage of LC_MESSAGE

This commit is contained in:
李通洲
2024-08-24 00:24:50 +08:00
parent df873a19e1
commit a54cbee79a
2 changed files with 0 additions and 13 deletions
-3
View File
@@ -54,9 +54,6 @@ void ffInitInstance(void)
#else
// Never use `setlocale(LC_ALL, "")`
setlocale(LC_TIME, "");
#ifdef LC_MESSAGES
setlocale(LC_MESSAGES, "");
#endif
#endif
initState(&instance.state);
-10
View File
@@ -8,19 +8,9 @@ void ffDetectLocale(FFstrbuf* result)
if(result->length > 0)
return;
ffStrbufAppendS(result, getenv("LC_MESSAGES"));
if(result->length > 0)
return;
ffStrbufAppendS(result, getenv("LANG"));
if(result->length > 0)
return;
#ifdef LC_MESSAGES
ffStrbufAppendS(result, setlocale(LC_MESSAGES, NULL));
if(result->length > 0)
return;
#endif
ffStrbufAppendS(result, setlocale(LC_TIME, NULL));
}