multilingual support

how to make one single app in different languages so that the user has the advantage of playing games in their own native language?
The languages that i want my app to support is
English,Dutch,German,Italian.
Is this possible? [import]uid: 45566 topic_id: 24418 reply_id: 324418[/import]

Here is what I use:
local language = system.getPreference(“ui”, “language”)for english it returns “en”, swedish “sv”
then i create tables, local string1 = { [“en”] = “The english translation”, [“sv”] = “The swedish translation”}
display.newText(string1[language], 200, 200)

for the splash screens you just create a folder, called en.lproj inside your project folder, and then place the splash screens in there. The app will pick the correct splash screen for whatever language

Language codes: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
[import]uid: 24111 topic_id: 24418 reply_id: 98754[/import]

What @oskwish said.

You can even have multi-linqual graphics, just put a suffix on the filename:

button01_en.png
button01_pt.png

Then when you capture the default language for the reader you might want to something like:

local supported\_languages = {"en", "pt", "es", "de", "fr" }  
local pref\_language = system.getPreference("ui", "language")  
local lang = "en"  
for i = 1, #supported\_languages do  
 if pref\_lang == supported\_langauges[i] then  
 lang = pref\_lang  
 break  
 end  
end  
--   
-- at this point, "lang" is either going to be "en" or one of the   
-- supported languages.  
--  
  
... later on  
  
local button1 = display.newImage("images/button01\_" .. lang .. ".png")  

[import]uid: 19626 topic_id: 24418 reply_id: 98764[/import]


local language = system.getPreference(“ui”, “language”) for english it returns “en”

However this is true only for iOS. I have an android device that returns “English”. I wonder if that is a normal behavior for all android devices?
Raúl Beltrán
MIU Games [import]uid: 44101 topic_id: 24418 reply_id: 98835[/import]

Never knew we can just add language identifier to the end of image files.

Neat! [import]uid: 64174 topic_id: 24418 reply_id: 98871[/import]

It’s not that magical. You have to program in which files to open, but by matching part of the file name to the code returned by system call, and if you’re consistant then it makes the programming easy.
[import]uid: 19626 topic_id: 24418 reply_id: 98872[/import]

Oops! I did not see the entire code.

@Rob
I thought this was something like adding @2 for higher resolution displays.
I mean I thought the device detects automatically if we just added the suffix.

My Bad! [import]uid: 64174 topic_id: 24418 reply_id: 98873[/import]

local pref_language = system.getPreference(“ui”, “language”)
print(pref_language)

I wrote the above code and got
1033 as my result instead of “en”
.Now I just wanted to know that what does this no depict or am i wrong somewhere? [import]uid: 45566 topic_id: 24418 reply_id: 99442[/import]