Back to the main site

GOG API and Language

Is there a way to send which language version of a game you want to download via the GOG API?

I’m currently trying to use the GOG API to download the Eye of the Beholder 2. When I download the game from my collection without a language defined via the GOG API, I get the Spanish version of the game. I have English set as my default language in my GOG account.

A similar question was asked here. Maybe this will help you too. As for why you get the Spanish version: no idea…

I’m the installer writer. I’m seeing if there is some way to have the end user specify the language then have it download the correct version.

After reading the other person’s issues, I think I have a clue. It looks like the GOG API is downloading the last available language. For EoB2, GOG offers de, en, es versions of EoB2. If you look on the GOG website, it is listed in that previously mentioned order. In @MinniMe’s post, GOG offers Toonstruck only de and en languages. Only the en language version of Toonstruck is downloaded via Lutris’s implementation of GOG’s API.

Probably need to open a bug for this on Github.

1 Like

Thanks for taking the time to investigate this.

I didn’t find anything either so a bug report (or feature request) is in order here. :slight_smile:

I found out my issue wasn’t really the API but with innoextract. GOGs InnoSetup file can have multiple versions of the same file in the archive based on language. I had to put an input selector in the installer section to let the user select the desired language before the extract happens. Here is a little exert of my installer script as an example.

installer:
    - input_menu:
        description: Choose available game language
        id: LANG
        options:
        - de-DE: "Deutsche"
        - en-US: "English"
        - es-ES: "Espa\xF1ol"
        preselect: en-US
    - extract:
        dst: $CACHE
        file: $INNO_INSTALLER
    - execute:
        args: --language "$INPUT_LANG" -d "$CACHE" "$GOG_INSTALLER"
        file: $CACHE/innoextract
    - merge:
        dst: $GAMEDIR
        src: $CACHE

Not sure if this helps @MinniMe but it may give him/her help.

Seeing as ToonStruck is ScummVM game, I think my fix would probably work for you, @MinniMe