Locale - A simple localization system for LOVE
Posted: Sun Dec 14, 2014 4:59 am
Hello everyone!
While writing my game (that hasn't been released yet), I added in a localization system, and I thought I may as well post it here so that others can use it also.
Usage is pretty easy:
I use what I believe is a standard localization file system, where it would look something like this:
If you want to get it from Github, it's here
Here's an example setup in the form of a LOVE file, and also the library itself:
While writing my game (that hasn't been released yet), I added in a localization system, and I thought I may as well post it here so that others can use it also.
Usage is pretty easy:
Code: Select all
locale = require "locale"
function love.load()
locale.setLocalization("en_US")
end
function love.draw()
love.graphics.print(locale.getLocalized("text.test"), 10, 10)
end
Code: Select all
text.test=Test
text.hello=This is some more text
Here's an example setup in the form of a LOVE file, and also the library itself: