free-gettext hello-world added by mario-goulart on Thu Jul 12 21:00:14 2012

$ cat my-app.scm
(use free-gettext)

(textdomain "myapp")

(define gt (make-gettext "myapp"))
(print (gt 'locale))
(print (gt 'domain))

(set! gettext (gt 'getter))

(print (gettext "hello world"))


$ xgettext -d locale/pt_BR/LC_MESSAGES/messages my-app.scm

$ cat locale/pt_BR/LC_MESSAGES/messages.po
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-07-12 15:57-0300\n"
"PO-Revision-Date: 2012-07-12 15:58-0300\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: my-app.scm:11
msgid "hello world"
msgstr "Olá mundo"


$ LANG=pt_BR GETTEXT_PATH=./locale csi -s my-app.scm
hello world