Lua string hashing library, useful for internationalization
Lua
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
spec cleanup of _TEST as busted will now set it Oct 7, 2012
src Always expose registry Feb 23, 2015
.gitignore
.travis.yml Update travis build for latest busted Feb 23, 2015
CONTRIBUTING.md
LICENSE
README.md
say-1.3-1.rockspec Version 1.3-1 Feb 27, 2015

README.md

Say

travis-ci status

say is a simple string key/value store for i18n or ay other case where you want namespaced strings.

Check out busted for extended examples.

s = require("say")

s:set_namespace("en")

s:set('money', 'I have %s dollars')
s:set('wow', 'So much money!')

print(s('money', 1000)) -- I have 1000 dollars

s:set_namespace("fr") -- switch to french!
s:set('so_much_money', "Tant d'argent!")

print(s('wow')) -- Tant d'argent!
s:set_namespace("en")  -- switch back to english!
print(s('wow')) -- So much money!