From 6ec1a50908308c2c75758281c689ad6f61fe2ae2 Mon Sep 17 00:00:00 2001 From: utox39 Date: Tue, 18 Mar 2025 10:27:56 +0100 Subject: [PATCH] feat(macos): add locale info --- src/macos/macos.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/macos/macos.zig b/src/macos/macos.zig index dcc5668..a390a01 100644 --- a/src/macos/macos.zig +++ b/src/macos/macos.zig @@ -76,6 +76,11 @@ pub fn getHostname(allocator: std.mem.Allocator) ![]u8 { return hostname; } +pub fn getLocale(allocator: std.mem.Allocator) ![]u8 { + const locale = try std.process.getEnvVarOwned(allocator, "LANG"); + return locale; +} + /// Returns the system uptime. /// /// Uses `sysctl` to fetch the system boot time and calculates the elapsed time.