From d6e1eda673e1a19d1f3462a626b5420731464a99 Mon Sep 17 00:00:00 2001 From: Leonel Quinteros Date: Fri, 24 Jun 2016 10:54:48 -0300 Subject: [PATCH] Improve docs for 0.9.0 release --- README.md | 2 +- gotext.go | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0616640..cbeb17c 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ This is a normal Go compiler behaviour. ## 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 import "github.com/leonelquinteros/gotext" diff --git a/gotext.go b/gotext.go index d464c65..8509602 100644 --- a/gotext.go +++ b/gotext.go @@ -1,5 +1,23 @@ /* 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