i18n

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package i18n shares MyGo's message catalogs with the native UI and pages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Keys

func Keys() []string

Keys returns the source catalog's message keys.

func Language

func Language() string

func Plural

func Plural(key string, n int) string

Plural uses the language's ICU plural rules.

func SetLanguage

func SetLanguage(tag string)

SetLanguage keeps the existing Chinese/English preference and accepts MyGo's pseudo locales for layout checks.

func T

func T(key string) string

T retains the dotted keys used by dynamic menus and settings indexes.

func Tf

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

Tf formats positional callers through the catalog's named ICU arguments.

Types

This section is empty.

Jump to

Keyboard shortcuts

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