Localize

About Localize

Type: Lua module
License: BSD License
Supported platforms:

       

Categories:
  • Localization

Gideros Localize module provides seamless localization support for Gideros, by loading string constants from specific files based on user locale.

This module provides global object Localize, which overrides native or non native objects, to check for localization before using strings, thus seamlessly (thanks to bowerandy) integrating localization support.

Package contains Localize.lua module and example Gideros application project.

Code example:

--simple Gideros app, nothing's changed
local font = TTFont.new('tahoma.ttf', 15)
 
--We can use simple text
local text = TextField.new(font, 'This is a simple string')
text:setPosition(0,50)
stage:addChild(text)
 
--Or we can format string printf style
local text = TextField.new(font, string.format('Hello, %s', 'Arturs'))
text:setPosition(0,20)
stage:addChild(text)
				

Localize video