※ There is new updated post. This post is just for archive.
I write this for remember how to translate C&C Mods to Korean. My last translation was almost 8 years ago. So, I was forgot many of things and that happen to many mistakes with new translation project.
As you know, Most C&C Modders are using mod.str for language strings. But mod.str is not support non-Latin Languages like CJK(Chinese, Japanses, Korean). So I need to convert mod.str to .csf file. I heard that all mods after Red alert 2 have same problem.
First of all, Thanks to boolbada who make str2csf.py and how to convert mod.str encode. If I didn't read his blog post, I can't translate any C&C Mods. You can see my post is just translation of his post with latest update.
I use these tools for all process: iconv, Python3, str2csf.py, FinalBig, StringtableEditorII
※ I guess StringtableEditorII is just for Korean. Encode use EUC-KR. If you are not Korean, Maybe you need something different CSF editing tools like Bibber's C&C String Editor, Alexander's Turbo String Table Editor. Unfortunately, Turbo Editor 2.0.1 version link is broken. That link is for 2.0.0 by Wayback machine.
@boolbada
Normally, Other countries' mods are make str instead of using csf.
Somehow, They don't need go this way and that to txt <-> csf.
And also, They don't need StringTableEditor what terribly inconveninet tool.
That's much better twice. :(
1. Extraction mod.str from Mod.
- Download FinalBIG and unzip. Maybe any other .Big Editor is okay.
- (For only extract, I recommend Bibber's C&C BIG Extractor)
- Open .big file where mod.str in there.
- Find mod.str, Select mod.str, Edit -> Extract
- Now mod.str is out of mod now.
@boolbada
str file must be convert to utf-16.
So, How can I do this ? Using text editors with converting unicode ? Or notepads ?
Unfortunately, Then all of special characters like something stick on a 'e' will be break.You don't want it ? Using iconv.
Normally str using in English. :| Convert latin1 to utf-16 will works.
Then special character will be convert beautifully.
Sometimes, utf-8 break characters. utf-16 is the only answer.
2. Convert mod.str's encode to UTF-16 using iconv
- I'm using Windows. So, I will download iconv for Windows. I download static 64bit portable zip file.
- Unzip them. And after that, There is iconv.exe at bin folder.
- Please mod.str with iconv.exe at the same path.
- Open Command Prompt at that path, Type this: iconv -f latin1 -t utf-16 mod.str > mod2.str
- Now mod.str have UTF-16 encode.
3. Convert mod.str to x.csf (C&C3 = cnc3.csf, Red Alert 3 = gamestrings.csf)
- You can see str2csf.py is python script. Download and install Python3. Maybe you need reboot.
- Download str2csf.zip and unzip. There is str2csf.py
- Please mod2.str and str2csf.py at the same path.
- Open Command Prompt at that path, Type this: str2csf.py mod2.str x.csf
- Now mod2.str is convert to x.csf
Now I can translate with any CSF editors like StringtableEditorII. But, This is very inconvenient and I want to use any Text editor. So, I will convert one more.
@boolbada
Did you succeed convert str ? then now, You can use my script. Py means Python script.
4. Convert x.csf to x.txt
- I use StringtableEditorII. So, Download and unzip it.
- Run StringtableEditorII.exe, Select 도구(Tool) -> CSF2TXT
- Find and select x.csf before you made.
- Save x.txt and now I can open x.txt file with Text Editor. I can Translate !
- (If your CSF Editor has same convert function. You can use any other editor.)
- Translate is complete ? then Run StringtableEditorII.exe, Select 도구(Tool) -> TXT2CSF and save x.csf
- Caution. C&C3 = cnc3.csf, Red Alert 3 = gamestrings.csf
5. Add x.csf to mod
- Run FinalBIG.exe and open .big file what you extract mod.str before.
- Delete mod.str in .big and add file x.csf
- Add file path like this: C&C3 = cnc3.csf, Red Alert 3 = data/gamestrings.csf
- And must click save button. It's done.
Now play game with mod for test. Damn, It's so long trip right ? :D
@boolbada
StringTable Convert. The end.