Revert "Locale (macOS): queries system-wide locale preference"

This reverts commit 8b8efcdcce.
This commit is contained in:
Carter Li
2026-08-12 10:07:34 +08:00
parent 51cfd4b5ed
commit 16b10c162b
2 changed files with 1 additions and 14 deletions
-13
View File
@@ -1,13 +0,0 @@
#include "detection/locale/locale.h"
#include "common/apple/cf_helpers.h"
const char* ffDetectLocale(FFstrbuf* result) {
// Read the system-wide locale preference (equivalent to `defaults read -g AppleLocale`),
// which is NOT affected by user environment variables (LANG, LC_ALL, etc.)
FF_CFTYPE_AUTO_RELEASE CFStringRef appleLocale = CFPreferencesCopyAppValue(CFSTR("AppleLocale"), kCFPreferencesAnyApplication);
if (!appleLocale) {
return "Failed to read AppleLocale";
}
return ffCfStrGetString(appleLocale, result);
}