Any kind of project to check the changes is alright. Using empty or full template is fine. You may want to use the project you're using to make the gui that is going to be localized.
The folder "game/scripts" is just an example so it may change for other kind of templates. You can use other directories if you want, of course.
Those files being txt is because they aren't torquescript files, just the text. After doing all the text, running the program and obtaining its .lso and the languagemap.cs you can delete the txt for its release (I didn't release the txt files). Err, remember to save the original files somewhere for if you want to make updates after the release, of course.
To remove the BOM (byte order mark) is easy with notepad++:
http://www.larshaendler.com/2015/01/20/ ... h-notepad/
If you leave the BOM (a few bytes at the start of a text file) the program may not read the line correctly. But it may still work if the first line is something like:
first_line = Not used first line.
And you just don't use it.
Notepad++ is a freeware text editor with a very good support for a lot of languages (I know it works for English, Spanish and Japanese, for example). It's quite useful for coders, too. I particularly use a lot its "find in files" option for the torque 3d code. I recommend it.
So, let me point what it's supposed to be done:
1- Change the c++ code
2- Create a new project. Full template is a perfect start.
3- Compile the new exe with the changes made at the start for that new project.
The way to compile the new exe is in the build folder of that new project.
4- In "game/scripts" create all the text files in UTF8 without BOM you want like "English.txt", "French.txt", etc and set its content like told in the pastebin thing.
5- Do the changes to game/scripts/main.cs and game/main.cs as stated.
Note that you have to use the names of the files you made!
If you have English.txt, French.txt and Japanese.txt (for example) you'll need to make a few changes:
compileLanguage("./English.txt", 1); //that 1 exists to create languageMap.cs
compileLanguage("./French.txt", 0); //different line!
compileLanguage("./Japanese.txt", 0); //a new third language!
mainLangTable.addLanguage("./english.lso", "English"); //language #0
mainLangTable.addLanguage("./French.lso", "French"); //language #1
mainLangTable.addLanguage("./Japanese.lso", "Japanese"); //language #2
6- Run the exe (the newly created we did before) and the .lso and the languagemap.cs will be created in game/scripts.
7- In order for the gui to use those languages you have to use the textID field in the gui editor with the name of the line.
You can also change textID with the method setTextID(%textID)
To set a new text for the text gui of the image the console function could be:
(story_text_A01 = ... is a line defined in the txt)
8- If the text doesn't change right away use popDialog and pushDialog like said in the TorqueScript Reference Manual for localization.
Sorry if I'm not explaining myself correctly enough. If you still have any issue please don't hesitate to ask and I'll see if I can upload an example or something.