rscplus icon indicating copy to clipboard operation
rscplus copied to clipboard

Translate RSC+ into other languages

Open Hubcapp opened this issue 5 years ago • 2 comments

This requires hooking every single string in the client. There couldn't be that many of them, right?

Hubcapp avatar Nov 16 '20 20:11 Hubcapp

As it turns out, there are 446 hardcoded strings in the client that get displayed to the user. Here is the list of all of them.

hardcoded.strings.txt

Hooking each of these strings individually would be arduous and unwise. To best handle these, we should hook the functions that are used to display them to the player, and adapt the strings passed into the functions based on a translation dictionary, similar to what we already do to replace "Herb" with "Guam (unidentified)".

Hubcapp avatar Nov 20 '20 15:11 Hubcapp

Notable functions:

  • this.showMessage()
  • this.surface.drawstring()
  • this.surface.drawstringCenter()
  • this.surface.drawstringRight()
  • this.panel.addListEntry()
  • this.panel.updateText()
  • this.panel.addText()
  • this.menu.addItem()
  • this.showLoadingProgress()
  • new Menu()
  • this.surface.textWidth()
  • this.drawTextBox()
  • g.drawString()
  • Utility.sendClientError() [potentially, not for gui]

lmsv-mx123 avatar Jan 06 '21 02:01 lmsv-mx123