I'm not sure where the translation options are shown in the menu, if you want to enable from the configuration file I think only 2 options are really needed to start:
ai_service_enable = "true" input_ai_service = "<key>"where <key> should be replaced by the keyboard key that will trigger the translation service. If you're using a gamepad, then input_ai_service becomes input_ai_service_btn and the value should be the code for the input button you want to use (i.e. input_ai_service_btn = "11") - you can find out the values for each button by looking at your gamepad configuration in /opt/retropie/configs/all/retroarch-joypads/<gamepad_name>.cfg.
See also https://retropie.org.uk/forum/topic/28461/translate-games-on-the-fly/8