i18n

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package i18n is the message catalog (zh-CN, en). Keys are dot-separated; later tasks append their keys to zh.go and en.go (TestKeysMatch guards parity).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Keys

func Keys() []string

Keys are every key of the current language's catalog.

func Language

func Language() string

func Plural

func Plural(key string, n int) string

Plural formats key+".one" (n == 1) or key+".other" with n.

func SetLanguage

func SetLanguage(tag string)

SetLanguage maps any tag starting with zh to zh-CN, everything else to en.

func T

func T(key string) string

T returns the message for key, or the key itself when missing.

func Tf

func Tf(key string, args ...any) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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