It isn't that easy lol But which game are you talking about?
By analyzing the data of the game, you can find a way to edit the texts, so have the ability to translate the game. It isn't hard everytime, usually ports have a simple structure, so easy to edit