Having Different Start Pages for each Browser Language

The easiest way to setup a multilanguage start page in SiteKiosk is to use the included Start Screen under Start Page & Browser in the SiteKiosk Configuration. Template 1 of the Start Screen supports different languages out of the box.

If you want to directly call different URLs based on the selected browser language you can use the following HTML page.

<!DOCTYPE html>
		<title>Multilanguage Start Page Switcher</title>
		<script type="text/javascript">
			//URLs based on their language
			var StartPage = new Array();
			StartPage[5] = "";	// Czech
			StartPage[6] = "";	// Danish
			StartPage[7] = "";	// German
			StartPage[8] = "";	// Greek
			StartPage[9] = ""; // English
			StartPage[10] = ""; // Spanish
			StartPage[11] = ""; // Finnish
			StartPage[12] = ""; // French
			StartPage[16] = ""; // Italian
			StartPage[19] = ""; // Netherlands
			StartPage[20] = ""; // Norwegian
			StartPage[21] = ""; // Polish
			StartPage[22] = ""; // Portugese
			StartPage[24] = ""; // Romanian
			StartPage[25] = ""; // Russian
			StartPage[29] = ""; // Swedish
			StartPage[37] = ""; // Estonian
			StartPage[39] = ""; // Lithuanian
			StartPage[1033] = ""; // English US, only applies to Chrome engine
			StartPage[2057] = ""; // English UK, only applies to Chrome engine
			StartPage[2222] = ""; // neutral
			//Examples of other language ids: 1 Arabic, 4 Chinese, 17 Japanese, 55 Georgian, 86 Galician
			//Default language to be used if no other language matches
			var skdefaultlanguage = 2222; // neutral entry
			//End of Configuration
				//Code for SiteKiosk IE engine
				//Get the major language id of the currently selected language
				sklanguageid = SiteKiosk.LocaleManager.LangID & 1023;
				//Code for SiteKiosk Chrome engine
				(new Function(_siteKiosk.getSiteKioskObjectModelCode()))();
				//Get the major language id of the currently selected language with special handling for US and UK English in SiteKiosk Chrome engine
				sklanguageid = _siteKiosk.objectModel.callHostFunction("", "if ((SiteKiosk.LocaleManager.LangID & 1023) !== 9) return SiteKiosk.LocaleManager.LangID & 1023; else return SiteKiosk.LocaleManager.LangID;");
			function redirectBasedOnLanguage(sklanguageid){
				if (StartPage[sklanguageid] != null)
					document.location = StartPage[sklanguageid];
					document.location = StartPage[skdefaultlanguage];

Copy and paste the code to an editor like Notepad and save it as an HTML file, e.g. multilanguagestartpageswitcher.html. Put the file in the folder ..\SiteKiosk\html. Open the configuration of SiteKiosk, go to Start Page & Browser and select the file as your start page. The example works with IE and Chrome engine.

The configuration part of the above example code starts with an array that includes the language ids for the languages supported by SiteKiosk and the URLs associated with them. Change the URLs to match your needs. You may also use the file protocol for local pages.

The skdefaultlanguage includes the language id of the above array that should be used in case no matching id can be found in the array. The example uses a special neutral value, you may as well use one of the existing languages, e.g. 9 for English.

The try part of the code contains code for the IE engine. It uses the LangID property of the SiteKiosk Object Model to determine the currently selected browser language.

The catch part contains the code for the Chrome browser. The Chrome browser Object Model code (documentation available on request from calls the same LangID property of the classic SiteKiosk Object Model. Note that the Chrome browser distinguishes between US and UK English. 

Once the language id has been indentified the redirectBasedOnLanguage function calls the URL associated with that id or the one that has been set as the default, if no match can be found.