Jump to content

Question about BG1RE chinese translation and text encoding


Recommended Posts

Hello, I'm new to Baldur's Gate and recently learned about this mod. I know it's not localized into Chinese, so I tried to edit the .tra file under english folder, then reinstall. In game, the text I edited garble, does this mean that the method works, but there is an error in the text encoding? I tried to save file into different text encoding, (ANSI/UTF-8... someone says it should be GB2312, I tried too.) but got the same result.

It would be great if someone can guide me out.

屏幕截图 2023-08-03 212953.png

Link to comment

@lostink Welcome to the forums!

I have no idea, unfortunately. If you take a look at the mod "Unfinished Business", it has a simplified Chinese translation afaik, maybe you can deduct how they did it? When I open translated tra files (in \ub\lang\chinese), my Notepad++ tell me the encoding is "GB2312 (simplified)".

 

Please note: some mods use utf8-encoded tra files (for example Tweaks Anthology), but bg1re needs the "ANSI" format for its tra files.

Link to comment

According to the WeiDU Readme Simplified Chinese text is expected to be CP936-encoded. I don't think Notepad++ supports this format natively.

You could create a translation file in UTF-8 and use the command line tool "iconv" to convert it manually to the right code page. Linux and macOS should provide iconv by default. A Windows binary of iconv can be downloaded here: https://github.com/mlocati/gettext-iconv-windows/releases/latest

The general iconv syntax would be:

iconv -f utf-8 -t cp936 input.tra >output.tra

The LANGUAGE name for the Chinese translation in the mod's .tp2 script should either be "schinese" or "zh_CN", or otherwise WeiDU can't determine the right encoding when the mod is installed in an EE game.

Link to comment

Join the conversation

You are posting as a guest. 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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...