lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


maybe you can use a translate table.

tr = {}
tr.zh_CN = {}
tr.en_US = {}

tr.zh_CN["hello"]  = "你好"
tr.en_US["hello"] = "hello"

print(tr[lang]["hello"])


2011/1/13 Gustavo de Sá Carvalho Honorato <gustavohonorato@gmail.com>
Hi,

what is the best way to i18n Lua scripts? I've seen nothing about it in the web.

Thanks,
Gustavo