aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorJosé Carlos Nieto <xiam@menteslibres.org>2012-10-06 16:31:00 -0500
committerJosé Carlos Nieto <xiam@menteslibres.org>2012-10-06 16:31:00 -0500
commit5a54112ab0216ca5c0339f1bb4832f4a4f92b6e0 (patch)
treec1ea35d574cda44de8a9601449d0e8e4db8c9938 /README.md
parentTypos. (diff)
downloadgotext-5a54112ab0216ca5c0339f1bb4832f4a4f92b6e0.tar.gz
gotext-5a54112ab0216ca5c0339f1bb4832f4a4f92b6e0.tar.xz
Additional data on xgettext.
Diffstat (limited to 'README.md')
-rw-r--r--README.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/README.md b/README.md
index 7216e1d..ab836f0 100644
--- a/README.md
+++ b/README.md
@@ -44,6 +44,28 @@ You can use ``os.Setenv`` to set the ``LANGUAGE`` environment variable or set it
% ./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:
+
+``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.
+
+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.
+
+``sh
+% mv example.mo examples/es_MX.utf8/LC_MESSAGES/example.mo
+``
+
## Documentation
You can read ``gosexy/gettext`` documentation from a terminal