[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: i18n in Lua
- From: Nikolai Kondrashov <spbnick@...>
- Date: Fri, 14 Jan 2011 09:29:44 +0300
On 01/13/2011 08:55 AM, "J.Jørgen von Bargen" wrote:
Am 13.01.2011 01:59, schrieb Gustavo de Sá Carvalho Honorato:
what is the best way to i18n Lua scripts? I've seen nothing about it
in the web.
I use standard gettext-tools to create po files and translate them to
mo-files with PoEdit, then load them with a small lua-function
See http://lua-users.org/lists/lua-l/2010-04/msg00005.html for details
Similarly, we use gettext-tools, along with its usual "_" function for
marking translatable strings and translating them at runtime (using
libintl). We then use (a bit patched) lua-xgettext to extract the
translatable strings into a message database. Then we translate it using
poedit.
This is a typical gettext workflow. You should really take a look at its
manual: http://www.gnu.org/software/gettext/manual/gettext.html
We have a message database of around 2500 messages and it allows us to
handle it easily.
Sincerely,
Nick