Improve docs for 0.9.0 release

This commit is contained in:
Leonel Quinteros
2016-06-24 10:54:48 -03:00
parent 2af760a203
commit d6e1eda673
2 changed files with 19 additions and 1 deletions

View File

@@ -76,7 +76,7 @@ This is a normal Go compiler behaviour.
## Using package for single language/domain settings ## Using package for single language/domain settings
For quick/simple translations on a single file, you can use the package level functions directly. For quick/simple translations you can use the package level functions directly.
```go ```go
import "github.com/leonelquinteros/gotext" import "github.com/leonelquinteros/gotext"

View File

@@ -1,5 +1,23 @@
/* /*
Package gotext implements GNU gettext utilities. Package gotext implements GNU gettext utilities.
Version 0.9.0 (stable)
For quick/simple translations you can use the package level functions directly.
import "github.com/leonelquinteros/gotext"
func main() {
// Configure package
gotext.Configure("/path/to/locales/root/dir", "en_UK", "domain-name")
// Translate text from default domain
println(gotext.Get("My text on 'domain-name' domain"))
// Translate text from a different domain without reconfigure
println(gotext.GetD("domain2", "Another text on a different domain"))
}
*/ */
package gotext package gotext