Registry / utility / go-playground-universal-translator

go-playground-universal-translator

JSON →
library0.18.1gogounverified

Universal Translator is a Go library for translating validation error messages and other strings using locale-specific translations.

go get github.com/go-playground/universal-translator
INSTALL
IMPORT
SIG · GO-PLAYGROUND-UNIV
G
go-playground-universal-translator
utilitygov0.18.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ut
github.com/go-playground/universal-translator

Create a universal translator instance and get an English translator.

package main import ( "fmt" "github.com/go-playground/universal-translator" ) func main() { uni := ut.New(ut.En, ut.En) trans, _ := uni.GetTranslator("en") fmt.Println(trans.Locale()) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.18.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
35 hits · last 30 days
node
33
Resources
go-playground-universal-translator — go get go-playground-universal-translator · libregistry