lua-users home
lua-l archive

RE: A NetBSD system installer with Lua scripting, i18n

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


> Attached are three files (not very elaborate code, just meant as proof of
> concept): i18n.lua, a "library" that translates messages, and i18n.de,
> i18n.fr two sample message catalogs for german and french.
> 
> So far it can translate messages and change the order of parameters. Is
> that enough?
Have you checked existing implementations?
By Kikito; https://github.com/kikito/i18n.lua
By OlivineLabs; https://github.com/Olivine-Labs/say 
What I don't like about Say is that it requires ordered arguments, not named ones. Luassert uses it and it's been a pita. Probably nicest would be if you could also include formatting in the placeholders, but then it would almost become a template engine...
Thijs

AltStyle によって変換されたページ (->オリジナル) /