I’m using code like this:
GAME.NLS = {
TITLE_PLAY = {NL=“Spelen” ,EN=“Play Now”},
TITLE_OPTIONS = {NL=“Opties” ,EN=“Options”},
OPTIONS_SOUNDOPTIONS = {NL=“Geluidsinstellingen” ,EN=“Sound Options”},
OPTIONS_SOUNDEFFECTS = {NL=“Geluidseffecten” ,EN=“Sound Effects”},
OPTIONS_MUSIC = {NL=“Muziek” ,EN=“Music”},
READY = {NL=“Klaar” ,EN=“Ready”},
LEVEL = {NL=“Level” ,EN=“Level”},
STARS = {NL=“Sterren” ,EN=“Stars”},
BUTTON_BACK = {NL=“Terug” ,EN=“Back”},
BUTTON_PLAY = {NL=“Spelen” ,EN=“Play”},
…
and use this get function the select the text:
function M:getText(id)
local txt = self.nls[id][self.language]
if txt ~= nil then
txt = self.nls[id][“EN”]
end
if txt ~= nil then
libDebug:warn ("getText() Could not find NLS text with id "…id,self)
end
return txt
end