f

package
v0.1.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPlural

func DefaultPlural(msgID, msgIDPlural string, n int64, args ...any) string

DefaultPlural 根据 n 选择单数或复数形式。 当 msgIDPlural 为空时(例如源语言本身没有复数区分),直接使用 msgID。

func Format

func Format(format string, args ...any) string

Format format a string with args, like fmt.Sprintf, but if args tow many, not prints %!(EXTRA type=value); and if no args, will return original string, even it contains some verb(like %v/%d), it would not prints MISSING error. 格式化字符串,功能同 fmt.Sprintf, 但是当参数多于占位符时, 不会输出额外的 %!(EXTRA type=value); 当 args 为空时直接返回原字符串(若包含格式化动词也原样返回而不会打印 MISSING 错误)

Types

This section is empty.

Jump to

Keyboard shortcuts

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