i18n

package
v1.0.51 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Codes

func Codes() []string

Codes lists the canonical locales, for --help and error messages.

Types

type Lang

type Lang string

Lang is a Feishu locale (e.g. "zh_cn"); "" means unset.

const (
	LangZhCN Lang = "zh_cn"
	LangEnUS Lang = "en_us"
	LangJaJP Lang = "ja_jp"
	LangKoKR Lang = "ko_kr"
	LangFrFR Lang = "fr_fr"
	LangDeDE Lang = "de_de"
	LangEsES Lang = "es_es"
	LangItIT Lang = "it_it"
	LangRuRU Lang = "ru_ru"
	LangPtBR Lang = "pt_br"
	LangThTH Lang = "th_th"
	LangViVN Lang = "vi_vn"
	LangIdID Lang = "id_id"
	LangMsMY Lang = "ms_my"
)

func Parse

func Parse(s string) (Lang, bool)

Parse resolves a short code or Feishu locale to its canonical Lang. "" and unrecognized values return ("", false).

func (Lang) Base

func (l Lang) Base() string

Base returns the ISO 639-1 short code ("en_us" → "en"), or "" if unknown.

func (Lang) IsEnglish

func (l Lang) IsEnglish() bool

IsEnglish reports whether l uses the English TUI bundle (robust to "en_us" and legacy "en").

Jump to

Keyboard shortcuts

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