Skip to content

Every agent's model. One place. Codex on DeepSeek, Claude Code on Kimi, from the menu bar.

439 B
Raw Blame
package gui

import (
	"os"

	"github.com/yetone/magpie/internal/proc"
)

// systemLang is the first of the Mac's preferred languages, the one the
// page's navigator.language is; an app opened from Finder has no LANG.
func systemLang() string {
	if out, err := proc.Command("defaults", "read", "-g", "AppleLanguages").Output(); err == nil {
		if l := firstAppleLang(string(out)); l != "" {
			return l
		}
	}
	return envLang(os.Getenv)
}