Repository navigation
v1.0.0
We’re excited to announce the first stable release (v1.0.0) of go-zero-i18n, a lightweight and powerful library designed to simplify internationalization (i18n) integration for applications built with the go-zero framework.
Key Features:
✨ Effortless Integration: Seamlessly embed i18n capabilities into your go-zero projects with minimal configuration.
🌍 Multi-Language Support: Built on the battle-tested github.com/nicksnyder/go-i18n/v2/i18n, it supports dynamic language bundles, pluralization, and localized formatting (dates, numbers, etc.).
⚡ go-zero Native: Designed specifically for go-zero’s workflow, ensuring compatibility with middleware, routing, and context management.
📦 Simple Configuration: Define language files in JSON/YAML and load them effortlessly.
Get Started in Minutes:
import (
"github.com/zeromicro/go-zero/rest"
"github.com/ginvcom/i18n"
)
func main() {
flag.Parse()
var c config.Config
conf.MustLoad(*configFile, &c)
i18n.RegisterLanguages(c.Languages...)
// ...Add to your go-zero server
}