There's already two programs available that offer automatic translations when playing a game in Japanese, but the accuracy for both is definitely not perfect.
The first is RetroArch. Here's two videos from Youtube that demonstrates it's usage (both text and audio translations):
https://www.youtube.com/watch?v=sGNBMK71srQhttps://www.youtube.com/watch?v=Yij_ydE9vd4The second one is called Wanderbar which allows you to make your own instant translations. It appears to offer some sort of automatic translation and dictionary feature as well. You can read more about it here:
https://legendsoflocalization.com/wanderbar/Overall, no automatic translation program nor feature yet exists that can replace an actual fluent human speaker. Especially for a more complex language such as Japanese. However, this is still nice to have if no actual translation exists. Such programs will also become more valuable with time as well seeing as how many talented romhackers have left the translation scene like Bongo` and Dark Force. As well as many fan translators too such as those in DeJap Translations back in the early 2000s.