aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJosé Carlos Nieto <xiam@menteslibres.org>2013-02-19 15:16:09 -0500
committerJosé Carlos Nieto <xiam@menteslibres.org>2013-02-19 15:16:13 -0500
commit0d568c58f526645583b02a89824cacfaa57c9271 (patch)
tree3f17be3012dc417ce4eae4cf98d72ff214ae30c1 /README.md
parentTypo. (diff)
downloadgotext-0d568c58f526645583b02a89824cacfaa57c9271.tar.gz
gotext-0d568c58f526645583b02a89824cacfaa57c9271.tar.xz
Updating code (fixing leaks) and docs.
Diffstat (limited to 'README.md')
-rw-r--r--README.md27
1 files changed, 16 insertions, 11 deletions
diff --git a/README.md b/README.md
index 97b3581..e6f52ba 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,16 @@
## gosexy/gettext
-``gosexy/gettext`` is a wrapper of [GNU gettext][1], an internationalization and localization library for writing multilingual systems.
+Go bindings for [GNU gettext][1], an internationalization and localization
+library for writing multilingual systems.
## Requeriments
-The GNU C library. If you're using GNU/Linux, FreeBSD or OSX you should already have it.
+The GNU C library. If you're using GNU/Linux, FreeBSD or OSX you should already
+have it.
## Installation
-Just pull from the repository:
+Use `go get` to download and install the binding:
```sh
% go get github.com/gosexy/gettext
@@ -37,30 +39,33 @@ func main() {
}
```
-You can use ``os.Setenv`` to set the ``LANGUAGE`` environment variable or set it from a terminal:
+You can use `os.Setenv` to set the `LANGUAGE` environment variable or set it
+on a terminal:
```sh
% export LANGUAGE="es_MX.utf8"
% ./gettext-program
```
-Note that ``xgettext`` does not officially support Go syntax yet, however, you can generate a valid ``.pot`` file by forcing
-``xgettest`` to use the C++ syntax:
+Note that `xgettext` does not officially support Go syntax yet, however, you
+can generate a valid `.pot` file by forcing `xgettest` to use the C++
+syntax:
```sh
% xgettext -d example -s gettext_test.go -o example.pot -L c++ -i --keyword=NGettext:1,2 --keyword=Gettext
```
-This will generate a ``example.pot`` file.
+This will generate a `example.pot` file.
-After translating the .pot file, you must generate .po and .mo files and remember to set the UTF-8 charset.
+After translating the `.pot` file, you must generate `.po` and `.mo` files and
+remember to set the UTF-8 charset.
```sh
% msginit -l es_MX -o example.po -i example.pot
% msgfmt -c -v -o example.mo example.po
```
-Finally, move the .mo file to an appropriate location.
+Finally, move the `.mo` file to an appropriate location.
```sh
% mv example.mo examples/es_MX.utf8/LC_MESSAGES/example.mo
@@ -68,13 +73,13 @@ Finally, move the .mo file to an appropriate location.
## Documentation
-You can read ``gosexy/gettext`` documentation from a terminal
+You can read `gosexy/gettext` documentation from a terminal
```go
% go doc github.com/gosexy/gettext
```
-Or you can [browse it](http://go.pkgdoc.org/github.com/gosexy/gettext) online.
+Or you can [browse it](http://godoc.org/github.com/gosexy/gettext) online.
The original gettext documentation could be very useful as well: