GGDictionary allows for multiple 'languages' to be included in your Corona SDK powered apps.
Lua
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
GGDictionary.lua
README.md
english.language
german.language
languages.dat

README.md

GGDictionary

Basic Usage

Require the code
local GGDictionary = require( "GGDictionary" )
Create your dictionary
local dictionary = GGDictionary:new()
Create and add a language
local language = {}
language.name = "english"
language.strings = {}
language.strings[ "greeting" ] = "Hello"

dictionary:addLanguage( language )
Get a string
local string = dictionary:getString( "greeting" ) -- With no language passed in will default to .currentLanguage.
Get a string from a specific language
local string = dictionary:getString( "greeting", "french" )
Load a language from file
dictionary:addLanguageFromFile( "german.language" )
Change the current language
dictionary.currentLanguage = "german"
Destroy the dictionary
dictionary:destroy()
dictionary = nil

Update History

0.1

Initial release