+marekl Posted March 5, 2008 Share Posted March 5, 2008 Have you ever seen a cartridge prepared in two or more languages? It makes me wonder how to do it simply. I could prepare an Input after cartridge start and player chooses his language. But it seems quite complicated to check variables in in every follow-up commands and make all scripts twice. The simpliest way could be write all text strings always in both languages. But it isn't so nice. Do you have any idea? Quote Link to comment
Ranger Fox Posted March 5, 2008 Share Posted March 5, 2008 It would require editing the lua file directly. When the cartridge is first played, ask the player for a language: English = 0, German = 1, Italian = 2, etc. You would then store one message's text in an array. When you go to display the message to the player, use the numeric language ID as the place in the array. Therefore: msg = {"Message in English", "Message in German", "Message in Italian"} Wherigo.MessageBox{Text=msg[languageID]} Please note this is supposition and I have yet to test this in the builder and emulator. If and when I get the chance, I'll check it out. However, it might not be this week. Quote Link to comment
+_canadianbacon_ Posted March 5, 2008 Share Posted March 5, 2008 What I'd love to see is text externalized... and with variable replacement, ala Java... ie. text_en.properties ============== welcome=Welcome {0} to the game warning=You have {0} seconds to complete the task {1} text_fr.properties ============== welcome=Bienvenue {0} dans le jeu warning=Vous avez {0} secondes pour achever la tâche {1} (sorry if i mangled the French, I just used Google to translate!) the player would load the right resource based on your local and the text would all be filled in by calling a function with the reference, and passing in any variables/values ie getText("warning",{300, task.name}) Multi.line boxes... line.1=This is the first line of the box {0} line.2=This is the second line of the box line.3=This is the third {1}. All definitions of tasks, characters, items etc could use the resource files to fetch their names, descriptions and labels. This also might fix the rename of objects in builder issue, as you just change the resource file instead of the name of an object. All big changes, but something the powers that be could work on. Not being a LUA expert I don't know what the internationalization functions are built in. Quote Link to comment
+frigschneck Posted March 6, 2008 Share Posted March 6, 2008 that's a very good idea, canadianbacon! I'd love to have this implemented! one more important advantage I see with an externalised language file is that it could (should!) be encrypted, to avoid the problem of plain ascii text in the .gwc file (as is the situation right now). Quote Link to comment
+kazuma Posted March 6, 2008 Share Posted March 6, 2008 Have you ever seen a cartridge prepared in two or more languages? It makes me wonder how to do it simply. [...] Do you have any idea? ...my 0.02€ I have just (today) submitted my first cartridge (proudly speaking, the first in Italy) and I have made it "multi-language". My solution 8and I am more than willing to listening to new and improved ideas, has been to create a function that set the texts (name & description) of all the objects in the cart. I have to work a little bit to improve also dialog messages even though all dialogs that refers to tasks use the texts from the name and the description. On the emulator and on my Colorado that workds pretty well... Kazuma, geocaching-italia Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.