How to translate into other languages?
It has been a while, so I am not sure that I completely remember all the steps.
But I started by extracting the lc_tables file. This has many files containing the UI text.
I then used a script to extract all Japanese sentences and words and sort them by numbers of characters (longest first) in a text file. This is needed to not mess up the replace later.
I use another script to feed each line to Google Translate and to put the translation in the same line in another text file.
So now we have 2 text files. One with the Japanese text and another with the English translation on the same line.
Those I use in the final part of the script open the interface file, replace all sentences line for line.
This is where sorting by length is important. Let us say there are 2 inventory items: "Bottle" and "Milk in a bottle". If the word Bottle is replaced first, then you replace it in "Milk in a bottle" too, and it messes up the replace. Far the easiest method to avoid this is to simply sort by character count after the first extraction. That way "Milk in a bottle" is already replaced when it comes to replacing "Bottle".
Finally when all files are translated, you make a new lc_tables file containing the translated interface, and voila.
Sorry if I am not explaining myself very well, but as I said, it has been a while and this game is the only one I have really done it with.