#!/bin/shlanguage=$(locale -l)# The locale can be a single 2 char language or in severall segments like en, se_SE or sr_Latn_ME# this tries to get the 2 char language code from longer locales as a fallbacklanguageBase=$(echo $language | awk -F_ '{print $1}')welcomeURL="\https://www.haiku-os.org/docs/welcome/welcome_en.html"welcomeFile=/boot/system/documentation/welcome/welcome_en.htmllocalizedWelcomeFile=/boot/system/documentation/welcome/welcome_"$language".htmllocalizedWelcomeFileBase=/boot/system/documentation/welcome/welcome_"$languageBase".htmlif [ -f $localizedWelcomeFile ]; thenopen file:$localizedWelcomeFileelif [ -f $localizedWelcomeFileBase ]; thenopen file:$localizedWelcomeFileBaseelif [ -f $welcomeFile ]; thenopen $welcomeFileelseopen $welcomeURLfi