View Single Post
fakuivan
Senior Member
Join Date: Nov 2015
Old 11-05-2015 , 18:18   Re: [TF2] Translating game item names
Reply With Quote #7

Quote:
Originally Posted by Potato Uno View Post
Don't use keyvalues because it's not even in keyvalues form. Just manually parse it as its flatfile form by reading each line individually. It's just a mess of string explosions and all but if you do it on OnPluginStart you should be ok (bar the watchdog timer).


Parsing it off-site using an external program and then having a second database to map translations to is better (although more work).
It seems like that's what I am going to do :º, I'll post it when I finish it.

Quote:
Originally Posted by Powerlord View Post
It's in UTF-16, and as FlaminSarge found out the hard way, SourceMod's KeyValues stuff doesn't appear to support it.

Now, if TextMsg does allow custom messages instead of a formatting string as its first String argument, then you'd need "#TF_zoomin_broom" to do a lookup of the name on the client.

Haven't been able to test it yet as I've been busy with other stuff (plus I need access to a game client and I've been at work)
#TF_zoomin_broom, as in items_game.txt

Quote:
Originally Posted by Potato Uno View Post
Just parse the tf_spanish.txt file?
3,71mb just for the spanish file :/
fakuivan is offline