i18n

package
v1.0.99 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 0 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

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