I built a Lua web application and it’s become clear that I need to begin internationalizing (“i18n”) it for my overseas customers.
In Lua, what’s the best way to internationalization my application?
I realize this is a significant undertaking, especially since some of my display is hard coded in HTML templates and some data fields are in my currently US-english oriented database.
Any guidance would be appreciated.
Edit: added metatable stuff
Certainly.
In one file you define a
i18nvariable with the following methods:In the same file, or in other(s), you include the locales you need inside
i18n.locales.Usage: