From 3e3c794a1e1e2e87ada893fa37a2ea52fe5c5f5a Mon Sep 17 00:00:00 2001 From: "sashakoshka@tebibyte.media" Date: Fri, 4 Oct 2024 23:57:12 -0400 Subject: [PATCH] Support LC_ALL --- locale/+linux.ha | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/locale/+linux.ha b/locale/+linux.ha index 951d13d..886492d 100644 --- a/locale/+linux.ha +++ b/locale/+linux.ha @@ -39,12 +39,16 @@ export fn get_time() locale = get_locale("LC_TIME"); export fn get_messages() locale = get_locale("LC_MESSAGES"); fn get_locale(var: str) locale = - match (get_locale_no_fallback(var)) { + match (get_locale_no_fallback("LC_ALL")) { case let local: locale => yield local; case => - yield match (get_locale_no_fallback("LANG")) { + yield match (get_locale_no_fallback(var)) { case let local: locale => yield local; - case => yield c; + case => + yield match (get_locale_no_fallback("LANG")) { + case let local: locale => yield local; + case => yield c; + }; }; };