uilang

package
v0.1.4635 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package uilang is the language magpie speaks in: the one the user picked in Settings (settings.Lang), or with "system" the system's. The GUI's page picks its own the same way (i18n.js setLocale and sysLocale); the tray, notices and the TUI ask Pick.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Env

func Env(getenv func(string) string) string

Env is the language the environment names: the first of LC_ALL, LC_MESSAGES, LANG and LANGUAGE set to one.

func Pick

func Pick(pref string, system func() string) string

Pick is the language for the setting pref: pref itself when it names one, else, with "system" (or none), the system's: Traditional Chinese for Taiwan, Hong Kong, Macau and any zh-Hant (zh_TW.UTF-8, zh-Hant-TW), Simplified for any other zh, Japanese for any ja, German for any de, English for the rest.

func System

func System() string

System is the system's language, as the environment names it.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL