locales

package
v0.85.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 5 Imported by: 10

Documentation

Overview

Package locales 为 web 包提供了本地化的内容

Index

Constants

View Source
const (
	ShouldGreatThanZero     = localeutil.StringPhrase("should great than 0")
	InvalidValue            = localeutil.StringPhrase("invalid value")
	CanNotBeEmpty           = localeutil.StringPhrase("can not be empty")
	DuplicateValue          = localeutil.StringPhrase("duplicate value")
	UniqueIdentityGenerator = localeutil.StringPhrase("unique identity generator")
	RecycleLocalCache       = localeutil.StringPhrase("recycle local cache")
)

一些多处用到的翻译项

Variables

View Source
var All = []fs.FS{
	Locales,
	ll.Locales,
	cl.Locales,
}

All 当前框架依赖的所有本地化内容

文件格式均为 yaml,使用时加载这些文件系统下的 yaml 文件即可:

s := web.NewServer(...)
s.LoadLocale("*.yaml", locales.All()...)
View Source
var Locales embed.FS

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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