Add engine option widget for language selection #2776
Conversation
AGS games can have multiple languages by providing additional translations as .tra files. The language selection is done by setting the config "translation" key to the tra file name. This means that we cannot easily use the standard ScummVM language selection for this purpose as the tra file name may not map to language names easily. The approach in this commit does something similar to the original games by detecting at runtime the available tra files.
|
I don't think this should be an engine specific feature, since other engines are in the same situation, such as |
And for reference here is the original setup utility, courtesy of @SupSuper: |
Supernova is in a different situation because we do not need to detect at run time which languages are available. So this can be done in the detection. And if we wanted to remove the multiple detection entries, the solution would be to extend the advanced game detector to support having multiple languages for a game. Then the Language popup in the Game tab would let the user select the language. |
I will merge this now. Further work on the config can then be done directly in master. |
AGS games can have multiple languages by providing additional translations as .tra files. The language selection is done by setting the config "translation" key to the tra file name. This means that we cannot easily use the standard ScummVM language selection for this purpose as the tra file name may not map to language names easily.
Also the advanced detector does not allow specifying multiple languages for a game, and adding separate detections for all the languages by using the tra files for the detection would be cumbersome.
Instead this pull request does something similar to the original games by detecting at runtime the available .tra files, but replaces the original setup utility by a game option widget.
It's not ideal that we have an ineffective Language selector in the Game tab, and another one in the Engine tab. Maybe to avoid confusion we could add a GUIO_NOLANGUAGE option that would hide the Language selector in the Game tab for the games that define it.