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.



Example codes

--simple Gideros app, nothing's changed
local font ='tahoma.ttf', 15)

--We can use simple text
local text =, 'This is a simple string')

--Or we can format string printf style
local text =, string.format('Hello, %s', 'Arturs'))

Example video

Video of module example app:

Method list

Override optional object

Back to method list

Method name new(object, method, index)
Description It is possible to add optional objects for seamless localization
Input parameters

object object - object, that we will be workign with, for example, TextField, Bitmap, Sound, etc

string method - name of the method as string, that we want to override.

integer index - Index of the argument passed to method, that we need to check for localization

Example input
Localize.load(Sound, "new", 1)

Changing directory

Back to method list

Property name path
Description It is possible to change path where to look for localization files simply by changing path property (default: 'locales')

Localize.path = 'locales'

Changing file type

Back to method list

Property name filetype
Description It is possible to change how language constants are stored.
Input parameters

string string_constant - string with format (default: 'lua'). Possible values:

  • lua - stored in lua table (keys as contstans and values as values)
  • json - stored in json structure (keys as contstans and values as values) Json class needs be included in the project to use this type

Localize.filetype = 'lua'

Latest changes

None for now