4
PkgDoc: [http://godoc.org/github.com/chai2010/gettext-go/gettext](http://godoc.org/github.com/chai2010/gettext-go/gettext)
9
1. `go get github.com/chai2010/gettext-go/gettext`
12
The godoc.org or gowalker.org has more information.
23
"github.com/chai2010/gettext-go/gettext"
27
gettext.SetLocale("zh_CN")
28
gettext.Textdomain("hello")
30
gettext.BindTextdomain("hello", "local", nil)
32
// gettext.BindTextdomain("hello", "local", nil) // from local dir
33
// gettext.BindTextdomain("hello", "local.zip", nil) // from local zip file
34
// gettext.BindTextdomain("hello", "local.zip", zipData) // from embedded zip data
36
// translate source text
37
fmt.Println(gettext.Gettext("Hello, world!"))
41
fmt.Println(string(gettext.Getdata("poems.txt"))))
46
Go file: [hello.go](https://github.com/chai2010/gettext-go/blob/master/examples/hello.go); PO file: [hello.po](https://github.com/chai2010/gettext-go/blob/master/examples/local/default/LC_MESSAGES/hello.po);
51
Please report bugs to <chaishushan@gmail.com>.