2009-10-30, 02:36 AM
Here is a screenshot of SOM working with gettext...
All that is needed is to make a file that looks like this:
#JDO: Level
msgid "???"
msgstr "Level"
#JDO:
msgid "???????"
msgstr "Main Menu"
It has to be a utf-8 text file. Which is kind of a pain, but there are text editors under Windows that can do this. But Windows apps like Notepad and Wordpad save in Microsoft's funky version of UTF-16LE. You run that file thru msgfmt, however unfortunately the msgfmt I found at https://gettext.sourceforge.net/ crashes saying "iconv failure" when using utf-8 in the msgid fields (I think) ...it's possible I just didn't set it up right. But it worked before I started adding the Japanese. Fortunately when I copied the files over to my Linux dev server they went thru fine and worked. It won't matter in the long run because I will set a section up on the website that lets people translate games online and download the translation file. I had a system like that setup at digitaldevildb.com so users could translate the website. It's broken since Todd let me move the website to this webhost however. Might be gettext is not supported on this server, but the commands seem to work, so I'm guessing I lost some hacks I made to the Wordpress source code.
The only possible limitation here is since SOM natively uses Shift_JIS, it may be game makers would be limited to English or Japanese when making their game. But anything can appear in the translation files. So you could just stick in your SOM message box [#00001] then have a script file that translates [#00001] into a Korean script. For your games however with this method they can be translated into any language and without editing the exe file. You can thank me later
All that is needed is to make a file that looks like this:
#JDO: Level
msgid "???"
msgstr "Level"
#JDO:
msgid "???????"
msgstr "Main Menu"
It has to be a utf-8 text file. Which is kind of a pain, but there are text editors under Windows that can do this. But Windows apps like Notepad and Wordpad save in Microsoft's funky version of UTF-16LE. You run that file thru msgfmt, however unfortunately the msgfmt I found at https://gettext.sourceforge.net/ crashes saying "iconv failure" when using utf-8 in the msgid fields (I think) ...it's possible I just didn't set it up right. But it worked before I started adding the Japanese. Fortunately when I copied the files over to my Linux dev server they went thru fine and worked. It won't matter in the long run because I will set a section up on the website that lets people translate games online and download the translation file. I had a system like that setup at digitaldevildb.com so users could translate the website. It's broken since Todd let me move the website to this webhost however. Might be gettext is not supported on this server, but the commands seem to work, so I'm guessing I lost some hacks I made to the Wordpress source code.
The only possible limitation here is since SOM natively uses Shift_JIS, it may be game makers would be limited to English or Japanese when making their game. But anything can appear in the translation files. So you could just stick in your SOM message box [#00001] then have a script file that translates [#00001] into a Korean script. For your games however with this method they can be translated into any language and without editing the exe file. You can thank me later