Documentation
¶
Overview ¶
Package i18n localizes the handful of user-facing strings the Go side produces (notification bodies, menu-bar style labels). The web UI carries its own dictionary (internal/webui/assets/i18n.js); this package only covers text that never passes through the webview.
The default locale is English and nothing is auto-detected at import time, so library consumers (and their tests) are deterministic. The GUI app calls SetLocale(Detect()) once at startup to follow the macOS system language.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Detect ¶
func Detect() string
Detect returns the user's preferred language. On macOS it asks the global preferences (AppleLanguages) — the same source the system UI language uses — because a GUI app launched from Finder/launchd inherits no LANG. Elsewhere (and as a fallback) it reads the usual POSIX env vars. NETSCOPE_LANG overrides everything, which is also the escape hatch for testing a language.
Types ¶
This section is empty.