You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By having a quick read on your suggestion, seems like getting localized token IDs through TFEconData won't be eligible for use in menus, as stated in the linked post by @nosoop the same creator of said TFEconData.
Item names are not manually entered, they are dynamically obtained through memory.
For localizing menus, you'll need to translate them server-side, either by maintaining an SQLite database like TF2IDB, creating your own translation file, or internally parsing the translation files.
Maintaining an SQLite Database for translations would be a solution, but would require updating constantly on each update which beats the purpose of this plugin being entirely made with TFEconData. Yes, there are still some updates needed such as Unusual Effect names and War Paint names, but this is nothing in comparison to updating an entire database. Even then this is something I'm looking to turn dynamic and let the plugin entirely update translations on runtime, but I do not have time to do this for now. (Again, PRs are welcome).
Personal translation files already exist for this. Just not for item names.
Internally parsing the entirety of tf_english.txt or other languages would be a really difficult and intensive task. There's too much memory to keep in mind when doing this, and would require some sort of technique to save this data somewhere as to not have the plugin eat up the entire server's memory space just for translation names. This is even stated by Dr. McKay on his parser as linked in the post
For now, I cannot include this sort of functionality for 2 reasons; I have tried in the past and don't really know or have the knowledge to do so at the moment, and even if I had I currently do not have time to actively work on it.
These days there's also the langparser extension, but as far as I can tell it just exposes an interface for it over C++ — it currently doesn't have any SourcePawn-native bindings, and anyone interested in tackling this would need to handle the parsing events themselves.
The server doesn't load translations into memory, so there's no way to access them short of reading the files.
Instead of manually entering them or only English, maybe you could use
TF2Econ_GetLocalizedItemName
?https://forums.alliedmods.net/showpost.php?p=2646354&postcount=10
The text was updated successfully, but these errors were encountered: