S-22 Posted 2004年12月27日 13:23 Author Posted 2004年12月27日 13:23 You have to use a one-byte chinese font to make chinese characters show up at all. But even then (since I don't know any chinese) I'm not sure it's working correctly. If got a demo font that only has some characters in it and it showed up like that: This is the "Sign the pact"-part of the main menu. You didn't translate this one in your language-file, so it seems like every ascii character is mapped to a chinese one (the very left = 'S', the next one = 'i', third = 'g' and so on). The ones you've already translated don't show up in the menu(!). So I think what you would have to do is: search for a font that maps the characters PK supports to chinese ones and translate all the entries in the text files using "normal" ascii characters. But I don't know if this really works or even if it is possible to map all chinese characters. Sorry, I can't do more because I don't understand anything and I really don't have knowledge about eastern language support... :-/ Maybe someone who knows about that can help.
S-22 Posted 2004年12月27日 13:30 Author Posted 2004年12月27日 13:30 游戏汉化分为很多种,去除图片汉化外,总体上说分为两种,即采用系统编码和采用内置字库图片关联,前者更简单,譬如FarCry, FS200x, 一些网游;后者复杂一些,需要编译工具生成,譬如Q3A, MOH, RtCW, COD, BF1942等等。 我没有下载过PK,但是从你说的网站上和下载了一些文件来看,PK属于前者的可能性非常非常大。 那个楼主的文件我下载不下来,只下载了那个西班牙的和你的,网站图片我这里也显示不出来,影响分析。 但是在此之前,你先进一步修改你的文件: 1. languages.lua 文件,把里面的: Languages = { Encoding = "iso-8859-1", Texts = {} } iso-8859-1 改成 gb2312,两边的引号注意不能去调。 2. 把 lang_Chinese.txt 里的: iso-8859-1 # encoding - use cp1250 for Windows Central European 改成 gb2312 # encoding - use Simplified Chinese charactor set 其实只改 gb2312 就行了,# 后面的表示注释,有没有没关系。 此外得确认kalme说的步骤也做了: 1. 编辑 [painkiller]\bin\config.ini 找 Cfg.language 改成 Cfg.language = "Chinese" 2. 如果不存在就建立一个这个目录 [painkiller]\data\LScripts\Main 复制以下文件到这个目录 Cfg.lua Languages.lua Lang_Chinese.txt 应该差不多了,但是从西班牙人和你传的文件来看,我没找到 Cfg.lua 文件,无法进一步分析。或许你能发给我,或者把kalme的一个较新版的.zip文件发给我看看。 如果上面的没有效果,那么还存在两个最后两个问题: 1. Cfg.lua 的内容 2. 我不知道 Languages.lua 文件中的以下代码是否涉及双字节,如果涉及到的话,要修改一下。这一步需要安装游戏来进一步分析,或者你能告诉我在哪里下载PK,我看看本地化结构。 function Languages_ParseLangLine( line ) line = string.gsub( line, "%s+", " " ) local hash = string.find( line, "#" ) if hash ~= nil then line = string.sub( line, 0, hash - 1 ) end line = string.gsub( line, "^%s+", "" ) line = string.gsub( line, "%s+$", "" ) if line == "" then return end local str = nil local num = nil for n,s in string.gfind( line, "(%d+):%s*(.+)" ) do num = n str = s end if num ~= nil and str ~= nil then Languages.Texts[tonumber(num)] = str else Languages.Encoding = line end end
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new account登录
Already have an account? Sign in here.
现在登录