As far as I understand Gog logic, it tweaks your language dynamically! Adopting to system language preferences.
Actually, it uses the session preferences. Which is fine most of the time, itç—´ just that it ignores any settings for this game in particular.
Fret not, as a simple modification to said script (
Divinity Original Sin.app/Contents/Resources/script) saves the day.
Comment out line 2 and add lines 3-4.
#!/bin/bash
#run game
#lang=`defaults read .GlobalPreferences AppleLanguages | tr -d [:space:] | cut -c2-3`
lang=$((defaults read com.larian.dos AppleLanguages 2>/dev/null ||
defaults read .GlobalPreferences AppleLanguages) | tr -d [:space:] | cut -c2-3)
if [ $lang == "en" ]; then
cd "game/Divinity - Original Sin.app/Contents/Data/Localization"
sed -i.bu 's/id="Value" value=".*"/id="Value" value="English" type="20"/g' language.lsx
cd "../../../../.."
open "game/Divinity - Original Sin.app"
elif [ $lang == "fr" ]; then
echo "Running lang: French"
cd "game/Divinity - Original Sin.app/Contents/Data/Localization"
sed -i.bu 's/id="Value" value=".*"/id="Value" value="French" type="20"/g' language.lsx
rm -rf *.bu
cd "../../../../.."
open "game/Divinity - Original Sin.app"
elif [ $lang == "de" ]; then
echo "Running lang: German"
cd "game/Divinity - Original Sin.app/Contents/Data/Localization"
sed -i.bu 's/id="Value" value=".*"/id="Value" value="German" type="20"/g' language.lsx
rm -rf *.bu
cd "../../../../.."
open "game/Divinity - Original Sin.app"
else
cd "game/Divinity - Original Sin.app/Contents/Data/Localization"
sed -i.bu 's/id="Value" value=".*"/id="Value" value="English" type="20"/g' language.lsx
cd "../../../../.."
open "game/Divinity - Original Sin.app"
fi
Now, one can set its language preferences in the
com.larian.dos.plist preference file (found in
~/Library/Preferences) using the command line:
$ defaults write com.larian.dos AppleLanguages "(en)"
$ defaults write com.larian.dos AppleLanguages "(fr)"
$ defaults write com.larian.dos AppleLanguages "(de)"
It still ignores any option from the command line. I could get a look into it, but I知 not sure how options are passed around executables and lack the motivation to find out.
It also only looks into the first language instead of choosing the one from {en, fr, de} which appears in the list, which means that settings such as "(zh,fr,en)" [I prefer Chinese, but French still comes before English] will default to English.
Thanks for your help, everyone!